Problem prime
User mingging1748
Submission Time 2024-05-10 21:22:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prime.cpp: In function ‘bool is_prime(long int)’:
prime.cpp:25:7: error: expected primary-expression before ‘if’
25 | if (if (n % i == 0) {
| ^~
prime.cpp:25:7: error: expected ‘)’ before ‘if’
25 | if (if (n % i == 0) {
| ~^~
| )
prime.cpp:28:2: error: expected primary-expression before ‘}’ token
28 | }
| ^