An integer is said to be prime if it is divisible by only 1


An integer is said to be prime if it is divisible by only 1 and itself. Write a function called prime() that takes in one integer number, and returns 1 (true) if the number is prime and 0 (false) otherwise. Write a program that generates a random number between 1 to 100 and calls function prime() to determine if it is prime or not. (You will need to have the program print out the number, and print out whether it is prime or not).

Request for Solution File

Ask an Expert for Answer!!
Electrical Engineering: An integer is said to be prime if it is divisible by only 1
Reference No:- TGS0607431

Expected delivery within 24 Hours