| Problem | 3nplus1 |
|---|---|
| User | AL |
| Submission Time | 2026-11-10 14:14:50 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
3nplus1.cpp: In function ‘int32_t main()’:
3nplus1.cpp:3:18: error: declaration does not declare anything [-fpermissive]
3 | #define int long long;
| ^~~~
3nplus1.cpp:7:2: note: in expansion of macro ‘int’
7 | int sum = 0;
| ^~~
3nplus1.cpp:7:6: error: ‘sum’ was not declared in this scope
7 | int sum = 0;
| ^~~
3nplus1.cpp:9:7: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator%’
9 | if(x%2 == 0){//even number
| ~^~
| | |
| | int
| double
3nplus1.cpp:11:3: error: expected ‘}’ before ‘else’
11 | else if(x%2 > 0){//odd number
| ^~~~
3nplus1.cpp:9:15: note: to match this ‘{’
9 | if(x%2 == 0){//even number
| ^
3nplus1.cpp:11:12: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator%’
11 | else if(x%2 > 0){//odd number
|