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
List some applications of c programming language?
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
Why c language?
What is break statement?
What are the properties of union in c?
What is the difference between exit() and _exit() function in c?
What is a method in c?
What is difference between scanf and gets?
What is getch () for?
What's the total generic pointer type?
The statement, int(*x[]) () what does in indicate?
Is c still relevant?
What is meant by preprocessor in c?
Explain what is the most efficient way to store flag values?
what do u mean by Direct access files? then can u explain about Direct Access Files?