C语言
3.有n个整数,使前面各数顺序向后移m个位置,最后m个数变成最前面的m个数,写一函数实现以上功能,在主函数中输入n个数和调出调整后的n个数。
#include "stdio.h" #include "string.h" #define M 50 typedef struct int m int n scanf("%s",n); C=a[n] for(m=0;m
答:#include int c(int n, int m) { if ( m==1 ) return n; else if ( n==m ) return 1;...详情>>