Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
111443 令狐文丽 12for循环练习I C++ Accepted 3 MS 272 KB 521 2025-03-02 09:47:37

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ //n -m /** for(初始值;条件;变化的量){ } //998 996 994 - 2 初始值 998 -2 i>=1 for(int i = 998;i>=1;i-=2){//i=i-2 cout<<i<<" "; } // 1-n中 3 // 1-40 3 6 9 12 15 18 21 24 27 30 33 36 39 //初始值 3 i+=3 i<=n long long n; cin>>n; for(int i=999;i<=999 and i>=1;i--){ cout<<i<<" "; } **/ int n,i; cin>>n; for( i=1;i<=n;i++){ cout<<i<<endl; } return 0; }


Run Info:

------Input------
4
------Answer-----
1 2 3 4
------Your output-----