问题描述
从键盘读入一个整数 n ,请输出 n∼1 之间所有的整数,每行输出 1个。
比如,假设读入 n=5 ,输出结果如下:
5
4
3
2
1
输入
一个整数 n 。
输出
输出 n∼1 之间所有的数,每行 1 个。
样例
输入
5
输出
5 4 3 2 1
#include<bits/stdc++.h>
using namespace std;
int main ()
{
int n;
cin>>n;
for(int i=n;i>=1;i--)
{
cout<<i<<endl;
}
return 0;
}