C语言实验——数组逆序
2016-11-06 23:44
253 查看
C语言实验——数组逆序
Time Limit: 1000MS Memory Limit: 65536KBSubmit Statistic
Problem Description
输入10个整数存入一维数组,按逆序重新存放后再输出。
Input
输入包括一行。 10个以空格隔开的整数。
Output
逆序的10个整数,整数以空格隔开。
Example Input
1 3 5 9 7 6 8 2 4 0
Example Output
0 4 2 8 6 7 9 5 3 1
#include <stdio.h> #include <stdlib.h> int main() { int a[11], i; for(i=1;i<=10;i++) { scanf("%d", &a[i]); } for(i=10;i>=2;i--) { printf("%d ", a[i]); } printf("%d", a[1]); return 0; }
相关文章推荐
- C语言实验——数组逆序
- C语言实验——数组逆序
- C语言实验——数组逆序
- C语言实验——数组逆序
- SDUT-1186 C语言实验——数组逆序
- Problem H: C语言实验——数组逆序
- 第十四周-C语言实验——数组逆序
- C语言实验——数组逆序 (sdut oj)
- C语言实验——数组逆序
- 第十三周 C语言实验——数组逆序
- C语言实验——数组逆序
- 实验6 数组2(输入n个整数,存入数组a中,分别按正序和逆序输出这些数;)
- 山东理工大学ACM平台题答案 1178C语言实验——数组逆序
- 栈实验之数组逆序
- C语言实验题——数组逆序
- C语言实验——数组逆序 (sdut oj)
- 实验6——2输入n个整数,存入数组a中,分别按正序和逆序输出这些数
- 实验6 数组1 输入n个整数,存入数组a中,分别按正序和逆序输出这些数
- oj第十四周实践C语言实验——数组逆序(2000)
- C语言实验-数组逆序