Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
141744 邓弘锐 02简单两数相加II C++ Compile Error 0 MS 0 KB 139 2025-12-28 14:49:37

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a,b; int a=1; int b=2; cout<<a+b<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:9: error: redeclaration of 'int a'
     int a=1;
         ^
Main.cc:5:9: note: 'int a' previously declared here
     int a,b;
         ^
Main.cc:7:9: error: redeclaration of 'int b'
     int b=2;
         ^
Main.cc:5:11: note: 'int b' previously declared here
     int a,b;
           ^