بيان المشكلة
Write a function int isPrime(int n) that returns 1 if n is a prime number, and 0 otherwise.
A prime number is greater than 1 and has no divisors other than 1 and itself.
DEMO-C-32 • Programming in C
Write a function int isPrime(int n) that returns 1 if n is a prime number, and 0 otherwise.
A prime number is greater than 1 and has no divisors other than 1 and itself.
A single integer.
1 or 0.
Submit runs every public testcase in this browser. Results and code never leave this device.
2
1
4
0
1
0
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question