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

void main()
{
int i,num=1;
clrscr();

while(num<=100)
{ i=2; while(i<=num)
{ if(num%i==0)
break;
i++; }
if(i==num)
printf("\n%d is Prime",num);
num++;
}
getch();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between malloc calloc and realloc in c?

1072


When should I declare a function?

1060


What does c mean in basketball?

944


how to make a scientific calculater ?

2012


What is main () in c language?

1080


How can you pass an array to a function by value?

1059


What are the functions to open and close the file in c language?

989


How can you tell whether two strings are the same?

1205


explain how do you use macro?

1100


Why is extern used in c?

1053


What are the functions to open and close file in c language?

1133


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1359


Using which language Test cases are added in .ptu file of RTRT unit testing???

4220


What is the general form of #line preprocessor?

950


What is far pointer in c?

1232