Problem prime
User Thomas
Submission Time 2023-07-15 16:19:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prime.cpp: In function ‘void is_prime(long long int)’:
prime.cpp:6:10: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
6 | return false;
| ^~~~~
prime.cpp:9:16: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
9 | return false;
| ^~~~~
prime.cpp:14:20: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
14 | return false;
| ^~~~~
prime.cpp:18:12: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
18 | return true;
| ^~~~
prime.cpp: In function ‘int main()’:
prime.cpp:24:16: error: invalid operands of types ‘void’ and ‘bool’ to binary ‘operator==’
24 | if(is_prime(x)==true)
| ~~~~~~~~~~~^~~~~~