| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 134705 | 王显端 | 05交换数据 | C++ | Compile Error | 0 MS | 0 KB | 170 | 2025-11-01 11:24:13 |
#include<iostream> using namespace std; int main() { int a,b; int a,b,c; cin>>a>>b; t=a; a=b; b=t; cout<<a<<" "<<b<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:6:9: error: redeclaration of 'int a'
int a,b,c;
^
Main.cc:5:5: note: 'int a' previously declared here
int a,b;
^
Main.cc:6:11: error: redeclaration of 'int b'
int a,b,c;
^
Main.cc:5:7: note: 'int b' previously declared here
int a,b;
^
Main.cc:8:5: error: 't' was not declared in this scope
t=a;
^
Main.cc:6:13: warning: unused variable 'c' [-Wunused-variable]
int a,b,c;
^