问题与代码:
文件名称:将输入的数组元素倒序输出
作者:邓哲
时间:2016年12月4日11:57:42
#include <stdio.h>
int main()
{
int a[10],i;
for(i=0; i<10; i++)
{
scanf("%d",&a[i]);
}
for(i=9; i>=0; i--)
{
if(i==0)
{
printf("%d",a[i]);
}
else
{
printf("%d ",a[i]);
}
}
return 0;
}
知识点总结:数组元素下标从零开始。