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

Expert's answer

#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!

LATEST TUTORIALS
APPROVED BY CLIENTS