标题:求助
取消只看楼主
初学者123
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-6-22
 问题点数:0 回复次数:0 
求助
请各位老师帮我找以下错误.
#include<stdio.h>
move(int array[20],int n,int m)
{
    int *p,array_end;
    array_end=*(array+n-1);
        for(p=array+n-1;p>array;p--)
            *p=*(p-1);
            *array=array_end;
            m--;
    if(m>0)move(array,n,m);
}
void main()
{
    int data[20],n,m,i;
    printf("input the value of n:\n");
    scanf("%d",&n);
    printf("input the value of m:\n");
    scanf("%d",&m);
    printf("input the n numbers:\n");
    for(i=0;i<n;i++)
        scanf("%d",&data[i]);
    move(data,n,m);
    printf("the order after move:\n");
    for(i=0;i<n;i++)
        printf("%d\t",&data[i]);
}
搜索更多相关主题的帖子: void include numbers 
2008-06-22 15:17



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-220525-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.778930 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved