Problem addition
User n
Submission Time 2024-02-16 21:34:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp:10:10: error: stray ‘\’ in program
10 | cin >> a\n;
| ^
addition.cpp:12:10: error: stray ‘\’ in program
12 | cin >> b\n;
| ^
addition.cpp:3:20: error: expected ‘;’ before ‘int’
3 | using namespace std
| ^
| ;
4 |
5 | int main ()
| ~~~
addition.cpp: In function ‘int main()’:
addition.cpp:8:2: error: expected initializer before ‘double’
8 | double b
| ^~~~~~
addition.cpp:10:9: error: ‘a’ was not declared in this scope
10 | cin >> a\n;
| ^
addition.cpp:12:9: error: ‘b’ was not declared in this scope
12 | cin >> b\n;
| ^
addition.cpp:13:42: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
13 | cout << "The sum of a and b is " << a+b/n;
|