"Being the richest man in cemetery doesn't matter to me..Going to bed at night saying we've done something wonderful..that's what matters to me."-Steve Jobs
c++ program that check whether enter number is prime or not
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,m;
cout<<"Please enter a number: ";
cin>>n;
for (int i=2;i<=(n-1);i++)
{
if(n%i==0)
No comments:
Post a Comment