#include <stdio.h>
int main(int argc, char *argv[]){
int arr[10] = {0};
int i;
printf("请输入十个数:");
for(i = 0; i < 10; i++){
scanf("%d", &arr[i]);
}
printf("您输入的数是:\n");
for(i = 0; i < 10; i++){
printf("%d\t", arr[i]);
}
printf("\n逆序输出:\n");
for(i = 9; i >= 0; i--){
printf("%d\t", arr[i]);
}
printf("\n");
return 0;
} |