Lets write a C program to check whether user input number is prime number or not, using while loop.
Prime Number: Any natural number which is greater than 1 and has only two factors i.e., 1 and the number itself is called a prime number.
All the numbers are perfectly divisible by number 1, so we initialize the variable count to 2. So our c program starts checking for divisibility from number 2.
C Programming Interview / Viva Q&A List
C Programming: Beginner To Advance To Expert

0 Comments