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 / santhi perumal

#include<Stdio.h>
#include<conio.h>

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

for(i=2;i<=100;i++)
{
for(j=2;j<i;j++)
{
if(i != j)
{
if(i%j != 0)
continue;
else
break;
}
}
if(i == j)
printf("%d ",i);

}
}

Is This Answer Correct ?    52 Yes 38 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How important is structure in life?

1082


What functions are in conio h?

1184


What is memory leak in c?

1127


Is it possible to execute code even after the program exits the main() function?

1336


What is auto keyword in c?

1206


Why doesn't C support function overloading?

2751


Which is best linux os?

1024


What is binary tree in c?

1102


Can we access the array using a pointer in c language?

1047


Can we increase size of array in c?

964


What is #line used for?

1024


What is boolean in c?

1088


What are variables and it what way is it different from constants?

1241


How we can insert comments in a c program?

1119


What is function in c with example?

1150