Problem nextprime
User blob
Submission Time 2023-12-08 13:52:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nextprime.cpp: In function ‘bool is_prime(int)’:
nextprime.cpp:5:9: error: expected primary-expression before ‘)’ token
5 | if (x<=) return false;
| ^
nextprime.cpp:6:7: error: ‘i’ was not declared in this scope
6 | for (i = 2; i*i <= x; i++)
| ^
nextprime.cpp: In function ‘int main()’:
nextprime.cpp:16:26: error: expected ‘;’ before ‘cout’
16 | while (!is_prime(p)) p++
| ^
| ;
17 |
18 | cout << p << endl;
| ~~~~