In the following problems, the variable color code will contain only integer values. There are three valid codes: 1 = Red, 2 = Blue, 3 = Yellow. All other codes are invalid.
Combine the previous statements into a multiple-line IF statement,
containing other multiple-line IF statements, but no single line IF statements.
```
c) IF color_code < 1 THEN
OUTPUT "Invalid Code"
ELSE
IF color_code =1 THEN
OUTPUT "Red"
ELSE
IF color_code =2 THEN
OUTPUT "Blue"
ELSE
IF color_code = 3 THEN
OUTPUT "Yellow"
ELSE
OUTPUT "Invalid Code"
END IF
END IF
END IF
END IF
```
You might also like to view...
Which of the following is one of the benefits of object-oriented programming?
a. Enables code reuse. b. More understandable code. c. More easily-maintained code. d. All of the above.
Which of the following is NOT a picture color mode?
A) Grayscale B) Sepia C) Shadow D) Washout
If your attendees share their Calendars, you can adjust for any meeting conflicts and find the best time for everyone to meet.
Answer the following statement true (T) or false (F)
The branch machine language instructions alter the normal _______ flow of control.
A. binary B. bi-directional C. sequential D. MIMD