C Program to Find Prime Numbers

      No Comments on C Program to Find Prime Numbers

C Program to Check Prime Numbers by this program you can able to print Pr no. on the screen. Trough c program for prime number, you can check that no. you type is P no. or not. It uses the basic logic if the is divisible only by “itself” & “one” then it is a Pr no., if the no. is divisible by another also then it is not a Pr no. There are various logic in c program to check prime numbers one of it mentioned below “Syntax”.

To generate prime no. Syntax < for ( c = 2 ; c <= (int)sqrt(n) ; c++ ) >

*In this article and program “P” & “Pr” refers to prime number*

Read Also:

C Program for Prime Numbers

C Program to Reverse a Number

C Program to Add Two Numbers

C program for prime number

Method #1Method #2
C Program to Find Prime Numbers
Output:

C program for prime number

 C program to Check prime numbers using functions
Output:

c program to print prime numbers using functions

Leave a Reply

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