//Check For Prime
//Downloaded from www.c4cprog.co.nr
#include<conio.h>
void main()
{
int n,i,p=0;
clrscr();
printf("Enter No :");
scanf("%d",&n);
if(n==1)
printf("\n Neither Prime Nor Composite");
else
{
for(i=2;i<=n/2;i++)
{
if((n%i)==0)
p++;
}
if(p==0)
printf("\n\n\t\tNO. IS PRIME");
if(p!=0)
printf("\n\n\t\tNO. IS NOT PRIME");
}
getch();
}
Programs Can Also Be Downloaded From The Folders Below....[Or Scroll Down]
Check For Prime No
Click Here To Download C File Of This Program
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment