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

Explain how many levels deep can include files be nested?

1073


What are global variables?

1182


Explain how do you declare an array that will hold more than 64kb of data?

1448


Is c call by value?

1014


What are the keywords in c?

1122


How are structure passing and returning implemented?

1034


what are bit fields in c?

1708


What is %s and %d in c?

1037


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

2322


Do pointers store the address of value or the actual value of a variable?

1077


How do you declare a variable that will hold string values?

1172


Tell me when is a void pointer used?

1176


Combinations of fibanocci prime series

1609


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

1177


What functions are used for dynamic memory allocation in c language?

1148