First Please Subscribe Our Channel Click Here For Subscribe
Close
C PROGRAMMING WORLD
BY SUNIL KUMAR DHEENDHWAL
Pages
INDEX
Home
INSTALING STEPS OF TURBO
How To Start Programming With C
HOW TO EARN MONEY ONLINE
Find Us On Facebook
WAP to check whether a given number is prime or not
void main()
{
int no,i;
clrscr();
printf("Enter the no");
scanf("%d",&no);
for(i=2; i<=no; i++)
{
if(no%i==0)
break;
}
if(no==i)
{
printf("prime");
}
else
{
printf("not prime");
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment