Problem | prime |
---|---|
User | asdiml |
Submission Time | 2023-01-09 00:18:45 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
prime.cpp: In function ‘int main()’:
prime.cpp:7:38: error: expected ‘;’ before ‘{’ token
7 | if(n==0 || n==1 || (!(n%2) && n!=2){
| ^
| ;
prime.cpp:11:28: error: expected ‘)’ before ‘;’ token
11 | int root = floor(sqrt(n));
| ^
| )
prime.cpp:7:5: note: to match this ‘(’
7 | if(n==0 || n==1 || (!(n%2) && n!=2){
| ^
prime.cpp:12:19: error: ‘root’ was not declared in this scope
12 | for(int i=3; i<=root; i+=2){
| ^~~~