98.Prime Number using while loop.
#include<stdio.h>
void
main()
{
int i=2,num=0;
while(i < num)
{
if(num%i==0)
break;
i++;
}
if(num==i)
{
printf("Prime Number\n");
}
else
printf("Not a prime number\n ");
}
Comments
Post a Comment