C program to find Prime number or not!

Hello C language lovers, school/college students here is another interesting program that will help you to understand the basic concepts of C language such as how to get a value from the user, How to print a value etc.,

In this post, we are going to write a simple C program to find the entered number is a Prime number or not!

Example Outputs of the program:

1) Output 1:

Find the entered number is Prime or not
Enter the number: 5
5 is a prime number

2) Output 2:

Find the entered number is Prime or not
Enter the number: 6
6 is not a prime number

Thanks for your time. Enjoy Learning!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top