Program for Prime Number Generation
#include
main()
{
int n,i=1,j,c;
clrscr();
printf("Enter Number Of Terms
");
printf("Prime Numbers Are Follwing
");
scanf("%d",&n);
while(i<=n)
{
c=0;
for(j=1;j<=i;j++)
{
if(i%j==0)
c++;
}
if(c==2)
printf("%d ",i)
i++;
}
getch();
}
At HelpWithAssignment.com we provide the best C Programming help. Our experts provide the best Online Tutoring, Assignment help and Homework help for College and University students.
For more details you visit our website at http://www.helpwithassignment.com/ http://www.helpwithassignment.com/programing-assignment-help .
This is continuation with our previous articles on C programming
No comments:
Post a Comment