Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Please write me a program to print the first 50 prime
numbers (NOT between the range 1 -50)

Answer Posted / pirya

#include<stdio.h>
#include<conio.h>
void main()
{
int count==0,n=0,i=1,j=1;
clrscr();
while(n<50)
{
j=1;
count=0;
while(j<=1)
{
if(count%i==0)
count++;
j++;
}
if(count==2)
{
printf("%d ",i);
n++;
}
i++;
}
getch();
}

Is This Answer Correct ?    13 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept and use of type void.

1100


Which is better oop or procedural?

1041


What is the role of && operator in a program code?

1051


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1581


What is pointer & why it is used?

1097


What is storage class?

1060


What is a pointer and how it is initialized?

1140


What is the description for syntax errors?

1142


Tell me is null always defined as 0(zero)?

1078


Explain why C language is procedural?

1207


How do you convert strings to numbers in C?

1213


What should malloc() do?

1152


Why flag is used in c?

1114


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1082


How can a number be converted to a string?

1307