程序实现功能:从键盘输入10个数,利用数组分别按正序和逆序将其输出。下面为程序的主要部分,请补充完整并验证结果。将填空的两行For语句粘贴到答题框 源程序: #include
void main() { int i,a[10]; printf("input 10 numbers:\n"); for(i=0;i<10;i++) scanf("%d",&a[i]); for( ; ; )//正序输出10个数 printf("%2d",a[i]); printf("\n"); for( ; ; )//逆序输出10个数 printf("%2d",a[i]); printf("\n"); return 0; } 思考:如果实现将此10个数按逆序的顺序存入数组a中,程序应该如何修改?