Given a positive integer n, return 1 if it is prime, 0 otherwise. Example: is_prime(7) returns 1, is_prime(4) returns 0
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers6
Suggested Problems
-
Determine if a number is prime
6 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!