keaton91 avatar

(C++) Declaring two variables in new line problem with solution

keaton91

Published: 12 Nov 2021 › Updated: 12 Nov 2021(C++) Declaring two variables in new line problem with solution

(C++) Declaring two variables in new line problem with solution

The annual Volley Tourney is just around the corner, and our town’s volleyball team will be joining this time around! To show our support, we’re planning on cheering them on in their game this Saturday!

But oh, we don’t have enough time to practice on the chant though, so we’re planning to just flash some words repeatedly on a screen to serve as our visual guide as of the moment. To do that, we need to ask help from a great programmer and you’re the only programmer we know, so could you help us out again this time?

Instructions:

Create two variables: one containing the uppercase character 'G' and the other with uppercase letter 'O'. You can name the variable anything you want as long as it’s a valid name that is accepted in C++.
Print out the values of the variable in alternate order, twice, on separate lines, using the std::cout function.
The output generated by your code must be the same as that of the sample output.
cheering squad.jpg

Leave (C++) Declaring two variables in new line problem with solution to:

Written by

Read more #code posts


Best Posts From keaton91

We have not curated any of keaton91's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From keaton91