Prime Number In DEV C++
========================================================================
#include<iostream>
using namespace std;
main()
{
int count=0,n;
cout<<"Enter Number\n";
cin>>n;
for(int i=1;i<=n;i++)
{
if(n%i==0)
{
count++;
}
}
if(count==2)
cout<<"prime Number \n";
else
cout<<"Not Prime Number\n";
}
========================================================================
OutPut:
Code By: Kabeer Hussain
0 comments:
Post a Comment