Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6443 吴承熹 04倒序输出五位数 C++ Compile Error 0 MS 0 KB 399 2025-03-01 09:39:18

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 a,s=0; cin>>n; while(n!=0){ int g=a%10; a=a/10; s=s*10+g; } cout<<s<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:10: error: 'n' was not declared in this scope
     cin>>n;
          ^