Exercise: Is the Number Prime
Write code to solve the problem.
Question
Write a function that determines whether an integer isprime. The function should take as input a single integer and return a 1 if the input is prime, and a 0 if it is not.
Sample input:
isPrime(12)isPrime(17)
Sample output:
01
Exercise: Is the Number Prime
Write code to solve the problem.
Question
Write a function that determines whether an integer isprime. The function should take as input a single integer and return a 1 if the input is prime, and a 0 if it is not.
Sample input:
isPrime(12)isPrime(17)
Sample output:
01