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 dispaly upto 100 prime numbers(without
using Arrays,Pointer)

Answer Posted / karthik

void main()
{
int i,j,m;
for(i=1;i<=100;i++
{
m=0
for(j=1;j<i;j++)
{
if(i%j==0)
m++;
}
if(m==0)
printf("%d",i);
getch();
}

Is This Answer Correct ?    54 Yes 87 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are operators in c?

961


What is the benefit of using #define to declare a constant?

1043


ATM machine and railway reservation class/object diagram

5191


Write a program with dynamically allocation of variable.

1067


What are the 4 data types?

959


what is the significance of static storage class specifier?

2184


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1289


How can I rethow can I return a sequence of random numbers which dont repeat at all?

1146


What is the most efficient way to count the number of bits which are set in an integer?

1000


How variables are declared in c?

988


List a few unconditional control statement in c.

926


Explain logical errors? Compare with syntax errors.

1008


What is the difference between a function and a method in c?

1029


List the difference between a "copy constructor" and a "assignment operator"?

957


What is wrong with this initialization?

954