Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

C program to check whether inputted number is prime number or not.

Prime numbers are divisible only by 1 and by themselves. 2,3,5,7,11 etc are prime numbers. These numbers are only divisible by 1 and by themselves. To check whether a given number is prime number or not, at first, we start a loop from 1 to given number and check as if it is divisible the loop incremented number and if it is, then we will print that given number is prime number and also if it is 2, we will directly check it and print that given number is prime number. Have a look here,





The Output





Share:

No comments:

Post a Comment

If you have any doubt, let me know...

Translate

Wikipedia

Search results