Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113498 钱恩浩 12for循环练习II C++ Compile Error 0 MS 0 KB 372 2025-03-15 19:21:47

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int i,j; cin>>i>>j; for(int i,j=1;i,j<=n;i,j=i,j+1) cout<<i<<j<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:24: error: 'n' was not declared in this scope
     for(int i,j=1;i,j<=n;i,j=i,j+1)
                        ^
Main.cc:9:30: warning: left operand of comma operator has no effect [-Wunused-value]
     for(int i,j=1;i,j<=n;i,j=i,j+1)
                              ^
Main.cc:9:33: warning: right operand of comma operator has no effect [-Wunused-value]
     for(int i,j=1;i,j<=n;i,j=i,j+1)
                                 ^