Program to check Prime Number in C

What is Prime number?
Prime number is whole number(integer) which has two factors 1 and itself. Some of prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, …etc and 4,6,8,9,12,14,15 …. are not prime numbers.

Program to check Prime number in C

void main()
{
int n,t,flag=0;
clrscr();
printf(“\n Enter a Value to check Primer number or not”);
scanf(“%d”,&d);
for(i=2;i1)
printf(“n%d is prime number”);
else
printf(“n%d is not prime number”);
getch();
}

Visit for more C Programming Tutorials

Related Posts

CheapSexCams
Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by k2schools