All Data For Free
Pages
Home
Watch Full WWE Episodes of Raw and Smackdown
Contact Us
Copyright Policy
Sunday, 27 November 2011
C++ Program for find prime number
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,i,c=0;
cout<<"Enter any value=";
cin>>n;
while(i>0)
{
if(n%i==0)
c++;
i++;
}
if(c==2)
cout<<"Number is Prime";
else
cout<<"Not prime";
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment