##
**C program to find prime numbers**

#include<stdio.h>
int main(){
int num,i,count=0;
printf("Enter a number: ");
scanf("%d",&num);
for(i=2;i<=num/2;i++){
if(num%i==0){
count++;
break;
}
}
if(count==0 && num!= 1)
printf("%d is a prime number",num);
else
printf("%d is not a prime number",num);
return 0;
}

output:

Enter a number: 11

11 is a prime number

-----------------------------------------------

Write a C++ program to find prime numbers between answers .Write a C Program to check number is Prime number . How can you write a program that will determine if the.Program to print first n prime numbers in c.?

C program to determine prime number. Determining if a number is prime in c. C program to find given number is prime or not

You have a wonderful site. Excellent blog post! Isn’t it a wonderful feeling to share to others what we have learned? Keep on sharing. :)

ReplyDeletewww.n8fan.net

Good Job.....

ReplyDeleteEasiest Program for prime numbers...

Write A Program To How To Find Whether Given Number Is Prime Number Or Not

It is great to have the opportunity to read a good quality article with useful information on topics that plenty are interested on.

ReplyDeletewww.imarksweb.org