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

Explain how do you list a file’s date and time?

990


why we wont use '&' sing in aceesing the string using scanf

2315


Why doesnt the call scanf work?

1140


What is int main () in c?

1031


What is the heap?

1157


When is the “void” keyword used in a function?

1430


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1273


How to find a missed value, if you want to store 100 values in a 99 sized array?

1366


How can I handle floating-point exceptions gracefully?

1110


What is function definition in c?

1024


What is the purpose of macro in C language?

1067


What is the purpose of scanf() and printf() functions?

1178


Explain what are compound statements?

997


Differentiate between static and dynamic modeling.

1054


What is a spanning Tree?

1501