Prime Number programm
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,r=0;
clrscr();
printf(“Enter any number ”);
scanf(“%d”,&n);
for(i=2; i<=n; i++)
{
if(n%i==0)
r=1;
break;
}
if(r==0)
printf(“number is prime no”);
else
printf(“number is Not prime”);
getch();
}
0 टिप्पणियाँ