Subscribe to Feeds

Send Your COMPLETED Projects To georgepj@hotmail.com

We'll Publish It With Your Name :-)

Programs Can Also Be Downloaded From The Folders Below....[Or Scroll Down]

Print n Prime Nos.

Click Here To Download C++ File Of This Program

 //Downloaded From www.c4cpp.co.nr  
//(C)2009.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n=0,i,l,j,k=2,a=0;
cout<<"Enter Limit"<<endl;
cin>>l;
while(n<l)
{
j=2;
a=0;
while(j<=k/2)
{
if(k%j==0)
a=a+1;
j++;
}
if(a==0)
{
cout<<endl<<k<<endl;
}
else
l++;
n++;
k++;
}
getch();
}

No comments: