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
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
What do you mean by c what are the main characteristics of c language?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
Is boolean a datatype in c?
State two uses of pointers in C?
What is the difference between array_name and &array_name?
What are global variables and how do you declare them?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
Can you pass an entire structure to functions?
Explain what is meant by 'bit masking'?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
write a program to print data of 5 five students with structures?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
The file stdio.h, what does it contain?