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

#include<stdio.h>
#include<conio.h>

void main()
{
int number,i;
clrscr();

for(i=1;i<=100;i++)
{
if(i%2==0)
{
printf("\n\n not prime number\t%d",i);
}
else

printf("\n\n prime number\t%d",i);
}
getch();
}

Is This Answer Correct ?    31 Yes 86 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is null in c?

1095


Why do we need a structure?

1041


a c code by using memory allocation for add ,multiply of sprase matrixes

2804


What are the advantages of external class?

1071


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

1051


Write a program to print numbers from 1 to 100 without using loop in c?

1085


What is the c value paradox and how is it explained?

1060


What is difference between stdio h and conio h?

1381


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6875


What is #include cctype?

1123


Explain what is the general form of a c program?

1099


How can I insert or delete a line (or record) in the middle of a file?

1020


State two uses of pointers in C?

1063


What are different types of pointers?

1073


What is the use of function in c?

1193