Answer to Question #318252 in C++ for chin

Question #318252

create two variables one containing the uppercase character G and the other with uppercase letter O you can want as long as its a valid name that is accepted in c++ print out the values of the varaiable in alternate order, twice, on seperate lines, using the std::cout function the outpit generated by your code must be the same as that of the sample output

1
Expert's answer
2022-03-25T15:11:43-0400
#include <iostream>


int main() {
    char ch1 = 'G';
    char ch2 = 'O';


    std::cout << ch2 << ch1 << std::endl;
    std::cout << ch2 << ch1 << std::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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog