Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
105890 罗迎甲 输出回文数 C++ Compile Error 0 MS 0 KB 535 2025-01-14 16:42:51

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 a1,s1=0,s2=0,s3,d1=0; cin>>s3; for(int i=1;i<=n;i++){ d1=0; s2=i; while(s2){ a1=s2%10; s1/=10; d1=d1*10+s1; } if(d1==i) cout<<d1<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:21: error: 'n' was not declared in this scope
      for(int i=1;i<=n;i++){ 
                     ^