Question: Can someone help explain how to do this in C++? 2. Use a loop and at least one variable to output the following sequence to
Can someone help explain how to do this in C++? 
2. Use a loop and at least one variable to output the following sequence to the console: 2,0,1,2,0,1,2,0 Your cout statement should print only the variable and a newline character. BONUS - print them all on one line, separated by commas, but omit a trailing comma as above. You can use any type of loop syntax - while, do-while, or for. The correct assignment of the initial starting value of the variable and the loop condition are significant! Hint: you can output an arithmetic expression, so think about the operators you have available
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
