Write a C++ program that allows the user to enter positive integers unitil zero
ID: 646006 • Letter: W
Question
Write a C++ program that allows the user to enter positive integers unitil zero is input. After each integer is input a function is called to determine if the last integer input was a prime number. Main() should output the value teste whether it was a prime or not?
Example run:
please input a positive integer or zero to exist the program
5 the value is prime
please input a positive integer or zero to exist the program
40 the value is not prime
please input a positive integer or zero to exist the program
15 the value is not prime
please input a positive integer or zero to exist the program
0 thanks for playing - goodbye