Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134699 王显端 05交换数据 C++ Compile Error 0 MS 0 KB 167 2025-11-01 11:22:20

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { int a,b; int a,b,c; cin>>a>>b; c=a; a=b; b=c; cout<<a<<" "<<endl; return 0; }


Run Info:

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;
       ^