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...

WAP that prints the number from 1 to 100. but for multiplies of
three print "XXX" instead of the number and for the multiplies of
five print "YYY" . for number which are multiplies of both three
and five print "ZZZ"

Answer Posted / raju kalyadapu

int main()
{
int i;
while(++i<=100)
{
if(i%3==0)
printf("XXX
");
  else if(i%5==0)
  printf("YYY
");
else if(i%3==0&&i%5==0)
printf("ZZZ
");
printf("%d
",i);
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List some applications of c programming language?

1002


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

1156


Why c language?

1125


What is break statement?

1183


What are the properties of union in c?

1111


What is the difference between exit() and _exit() function in c?

1132


What is a method in c?

1214


What is difference between scanf and gets?

1372


What is getch () for?

1318


What's the total generic pointer type?

1109


The statement, int(*x[]) () what does in indicate?

1205


Is c still relevant?

1141


What is meant by preprocessor in c?

1083


Explain what is the most efficient way to store flag values?

1274


what do u mean by Direct access files? then can u explain about Direct Access Files?

2150