Exercise: Check if number is prime

CodeMaven

Write a program that gets a number on the commnad line a prints "True" if the number is a prime number or "False" if it isn't.

$ is_prime 42
False

$ is_prime 19
True

Other pages

Programming Exercises

Author

Gabor Szabo (szabgab) Gabor Szabo