题目描述
输入10个数字,然后逆序输出。
输入
十个整数
输出
逆序输出,空格分开
样例输入
1 2 3 4 5 6 7 8 9 0
样例输出
0 9 8 7 6 5 4 3 2 1
参考代码:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;//自定义
const ll N=1e7;//定义常数
long long a[N];//定义数组
int main()
{
for(int i=1; i<=10; i++)
{
cin>>a[i];
}
for(int i=10; i>=1; i--)//倒序输出
{
cout<<a[i]<<' ';
}
return 0;
}
0.0分
0 人评分