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 / aravind

#include<stdio.h?
int main()
{
int i,count=0;
for(i=1;i<=100;i++)
{
a=i%10;
if(a==0)
{
count++;
if(count<=2)
printf("the prime numbers are %d",i);
}
else
count=count;
}

the above answer is good but it will not print 1 as prime.

Is This Answer Correct ?    14 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain low-order bytes.

1098


How to draw the flowchart for structure programs?

9393


What is nested structure with example?

1135


How do you use a 'Local Block'?

1226


What will the preprocessor do for a program?

1118


explain how do you use macro?

1209


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

2209


What is the meaning of c in c language?

1246


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2365


What is maximum size of array in c?

1087


What is graph in c?

1104


Difference between Shallow copy and Deep copy?

2075


What is quick sort in c?

1160


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1396


Is there sort function in c?

1069