Problem addition
User xrlightning
Submission Time 2025-06-05 22:25:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp: In function ‘int main()’:
addition.cpp:29:6: error: redeclaration of ‘int a’
29 | int a=100;
| ^
addition.cpp:24:6: note: ‘int a’ previously declared here
24 | int a=10;
| ^
addition.cpp:30:6: error: redeclaration of ‘int b’
30 | int b=9;
| ^
addition.cpp:25:6: note: ‘int b’ previously declared here
25 | int b=11;
| ^
addition.cpp:31:6: error: redeclaration of ‘int sum’
31 | int sum = a+b;
| ^~~
addition.cpp:26:6: note: ‘int sum’ previously declared here
26 | int sum = a+b;
| ^~~
addition.cpp:34:6: error: redeclaration of ‘int a’
34 | int a=1000;
| ^
addition.cpp:24:6: note: ‘int a’ previously declared here
24 | int a=10;
| ^
addition.cpp:35:6: error: redeclaration of ‘int b’
35 | int b=18;
| ^
addition.cpp:25:6: note: ‘int b’ previously declared here