#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
{
int num,i,num1;
cout<<"enter no=";
cin>>num;
i=2;
num1=num-1;
while(i<=num1)
{
if(num%i==0)
{
cout<<"not a prime no\n";
break;
}
i++;
}
if(i==num)
cout<<"prim no\n";
getch();
}
A Place which provide daily tips tricks technology news programming help games and all what you looking for
0 comments:
Post a Comment