Problem prime
User ilovepythonandhatecplusplus
Submission Time 2024-02-28 15:44:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prime.cpp: In function ‘int main()’:
prime.cpp:11:1: error: expected ‘}’ before ‘else’
11 | else if (n==8){
| ^~~~
prime.cpp:9:14: note: to match this ‘{’
9 | else if (n<2){
| ^
prime.cpp:12:18: error: expected ‘;’ before ‘}’ token
12 | cout<<"Not Prime"
| ^
| ;
13 | }
| ~
prime.cpp: At global scope:
prime.cpp:15:1: error: expected unqualified-id before ‘for’
15 | for (long long i=2;i<n;i++){
| ^~~
prime.cpp:15:20: error: ‘i’ does not name a type
15 | for (long long i=2;i<n;i++){
| ^
prime.cpp:15:24: error: ‘i’ does not name a type
15 | for (long long i=2;i<n;i++){
| ^
prime.cpp:25:1: error: expected declaration before ‘}’ token
25 | }
| ^