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

Can you pass an entire structure to functions?

1175


What is null in c?

1155


How can type-insensitive macros be created?

1219


What is the purpose of macro in C language?

1164


Define Spanning-Tree Protocol (STP)

1179


What is the difference between far and near in c?

1121


how to execute a program using if else condition and the output should enter number and the number is odd only...

2372


What is the purpose of 'register' keyword?

1135


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1193


What is the use of header files?

1156


What are structural members?

1066


write a program to find out prime number using sieve case?

2139


Why doesnt long int work?

1100


Why doesnt that code work?

1278


what type of questions arrive in interview over c programming?

2083