Question: please use C++ 2. CoLoRaDo Write a program that prints Co - Lo - Colo - Ra - Do - RaDo - CoLoRaDo in sequence
please use C++


2. CoLoRaDo Write a program that prints "Co - Lo - Colo - Ra - Do - RaDo - CoLoRaDo" in sequence 6 times. Here are some conditions you must satisfy: Generates a random integer number between (0.. 6). Based on the random number, the first word of the sequence is determined. For example, 0 --> Co, 2 --> Colo, 5--> RaDo, o It keeps printing the next word in circular sequence until it prints one before the first word in step one above. When the last word is printed, it goes to the next line and starts with the next word of the next word. (See an example below) Prints entire sequence 6 times. o Regardless of the starting word, the last line always should stop at "COLORaDo". O o Here is a sample output: Random number: 3 3 Ra - Do - RaDo- CoLoRaDo - Co - Lo - COLO Do - RaDo- CoLoRaDo - Co - Lo - COLO -Ra - - RaDo- CoLoRaDo - Co - Lo - COLO -Ra - Do CoLoRaDo - Co - Lo - Colo-Ra - Do - Rado Co - Lo - Colo - Ra - Do - RaDo - CoLoRaDo Lo - Colo - Ra - Do - RaDo - CoLoRaDo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
