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 / azad sable, chiplun

void main()
{
int i,n=1;
clrscr();
printf("\nprime no. between 1 to50 are:\n1\t);
while(n<=50)
{
i=2;
while(i<n)
{
if(n%1==0)
break;
else
i++;
}
if(i==n)
printf("%d\t",n);
n++;
}
getch();
}

Is This Answer Correct ?    20 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

show how link list can be used to repersent the following polynomial i) 5x+2

2222


What is the function of this pointer?

1254


When is a “switch” statement preferable over an “if” statement?

1104


What is a void pointer? When is a void pointer used?

1036


Explain about C function prototype?

1041


Which is better malloc or calloc?

1072


Why is c not oop?

944


Array is an lvalue or not?

1085


Do you know the purpose of 'register' keyword?

984


What are 3 types of structures?

1039


What are identifiers in c?

1163


How can you draw circles in C?

1110


What is #line in c?

980


Can a variable be both constant and volatile?

1070


In C language, a variable name cannot contain?

1240