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

Tell me when would you use a pointer to a function?

1067


How old is c programming language?

1013


Under what circumstances does a name clash occur?

1204


Is c still used?

1050


What is return type in c?

1141


Can the sizeof operator be used to tell the size of an array passed to a function?

1119


What is console in c language?

1101


What are Macros? What are its advantages and disadvantages?

1168


c program for searching a student details among 10 student details

2093


How can I find out if there are characters available for reading?

1111


What are bitwise shift operators in c programming?

1085


What is the difference between functions abs() and fabs()?

1160


What is meant by realloc()?

1160


Explain how can you tell whether two strings are the same?

1020


can any one tel me wt is the question pattern for NIC exam

1990