Question: TED UNIVERSITY Computer Engineering Department Question 2: Prime Test Part 1: The program should use a do/while loop to prompt the user for a number

TED UNIVERSITY Computer Engineering Department Question 2: Prime Test Part 1: The program should use a do/while loop to prompt the user for a number from 2 to 1000000 (up to 7 digits). If input is incorrect ( 1000000) the program should display "Incorrect input" and repeat the input process until a valid number is entered Part 2: The program should use a while loop to determine if the value entered is prime. A prime number is one that is not divisible by any integer in the range 2 through floor(sqrt(number)). For example, to determine if 401 is prime, each potential divisor from 2 through 20 should be checked (the square root of 401 is 20.025) If the value is prime, the program should display "
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
