Question: Do it as simple as possible please. 2. (50 pts) Write a C program q2.c that take an integer >=2 and checks if the number
Do it as simple as possible please.
2. (50 pts) Write a C program q2.c that take an integer >=2 and checks if the number is prime or not. If the number is not prime, its divisors are printed as in the example below. Example of output: P /q2 2 lease enter an integer >=2; Enter 0 to quit. 2 is prime. Please enter another integer >=2; Enter 0 to quit. 16 16 is divisible by 2 and 8 . 16 is divisible by 4 . Please enter another integer >=2; Enter 0 to quit. 23 23 is prime. Please enter another integer >=2; Enter 0 to quit. 63 63 is divisible by 3 and 21. 63 is divisible by 7 and 9 . Please enter another integer >=2; Enter 0 to quit. 0 Bye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
