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...

Write a program to print the prime numbers from 1 to 100?

Answer Posted / deva

int main()
{
int i,j,count=0;

for(i=2;i<100;i++)
{

for( j=2;j<i;j++)
{
if(i%j==0)
count++;

}
if (count==0)
printf("%d\t",i);
count=0;
}

}

Is This Answer Correct ?    22 Yes 37 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2746


What is c mainly used for?

1117


Differentiate between ordinary variable and pointer in c.

1252


What is far pointer in c?

1388


Why isn't any of this standardized in c? Any real program has to do some of these things.

1265


What are different types of operators?

1095


Place the #include statement must be written in the program?

1086


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

2148


Explain how do you sort filenames in a directory?

1075


how to write a c program to print list of fruits in alpabetical order?

2361


What do mean by network ?

1214


Which header file is essential for using strcmp function?

1533


Explain what is a pragma?

1088


What are the different data types in C?

1247


Are local variables initialized to zero by default in c?

1096