Problem nprime
User AltheaZ
Submission Time 2023-06-30 09:44:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nprime.cpp: In function ‘bool isPrime(int)’:
nprime.cpp:14:11: error: a function-definition is not allowed here before ‘{’ token
14 | int main(){
| ^
nprime.cpp:30:1: error: expected ‘}’ at end of input
30 | }
| ^
nprime.cpp:6:29: note: to match this ‘{’
6 | for (int i=2;i<sqrt(x);i++){
| ^
nprime.cpp:30:1: error: expected ‘}’ at end of input
30 | }
| ^
nprime.cpp:5:20: note: to match this ‘{’
5 | bool isPrime(int x){
| ^