Problem prime
User wongethan8192
Submission Time 2023-02-13 17:03:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prime.cpp: In function ‘std::string prime(int)’:
prime.cpp:4:21: error: a function-definition is not allowed here before ‘{’ token
4 | bool isPrime(int n) {
| ^
prime.cpp:13:11: error: a function-definition is not allowed here before ‘{’ token
13 | int main(){int H;cin>>H;cout<<(prime(H))?"Prime":"Not Prime";}
| ^
prime.cpp:13:62: error: expected ‘}’ at end of input
13 | int main(){int H;cin>>H;cout<<(prime(H))?"Prime":"Not Prime";}
| ^
prime.cpp:3:20: note: to match this ‘{’
3 | string prime(int x){
| ^