Problem 3nplus1
User Um
Submission Time 2023-04-28 18:59:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

3nplus1.cpp: In function ‘int main()’:
3nplus1.cpp:4:5: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
4 | if (n==int){
| ^
| yn
3nplus1.cpp:4:8: error: expected primary-expression before ‘int’
4 | if (n==int){
| ^~~
3nplus1.cpp:4:8: error: expected ‘)’ before ‘int’
4 | if (n==int){
| ~ ^~~
| )
3nplus1.cpp:5:7: error: redeclaration of ‘long int n’
5 | long n;
| ^
3nplus1.cpp:4:5: note: ‘<typeprefixerror>n’ previously declared here
4 | if (n==int){
| ^
3nplus1.cpp:10:8: error: redeclaration of ‘long int n’
10 | long n;
| ^
3nplus1.cpp:4:5: note: ‘<typeprefixerror>n’ previously declared here
4 | if (n==int){
| ^
3nplus1.cpp:11:8: error: expected ‘;’ before ‘cout’
11 | cin>>n
| ^
| ;
12 | cout<<n+n+n+1;