62 565
Assignments Done
99%
Successfully Done
In June 2018

Answer to Question #26634 in C++ for red rose

Question #26634
Write the following programs using a while loop:
a) Display the multiples of 3 backward from 33 to 3, inclusive.
b) Display the uppercase letters of the alphabet from A to Z.

Expert's answer
/*
* Write thefollowing programs using a while loop:
* a) Display the multiples of 3 backward from33 to 3, inclusive.
*/

#include <iostream>
using namespace std;

int main()
{
int i=33;
while(i>0)
{
cout<< i << " ";
i-=3;
}
cout<< endl;
return 0;
}


//=====================================================================



/* b) Displaythe uppercase letters of the alphabet from A to Z.*/
#include <iostream>
using namespace std;

int main()
{
char i='A';
while(i<='Z')
{
cout<< i++ << " ";
}
cout<< endl;
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions