编写程序,把一维数组a 输入任意6个整数。 程序运行示例: 7 4 5 9 1 2↙ 7 4 5 9 1 2 2 7 4 5 9 1 1 2 7 4 5 9 9 1 2 7 4 5 5 9 1 2 7 4 4 5 9 1 2 7 **输入格式要求:"%d" **输出格式要求:"%d " 在输出每一行的数据后加"\n"
#include<stdio.h>
#define N 6
int main(){
int i,j;
int a[N];
int count;
for(j = 0;j<6;j++){
scanf("%d",&a[j]);
}
for(count =0;count<6;count++){
for(j = 6-count;j<6;j++){
printf("%d ",a[j]);
}
for(j = 0;j<6-count;j++){
printf("%d ",a[j]);
}
printf("\n");
}
return 0;
}