186k views
4 votes
The program is to print values of three ordered integers variables (firstChoice, secondChoice, thirdChoice) only when the values are not zero. If the value is zero for any integer, the program does not print it. Additionally, a value of zero is only possible if the preceding value is non-zero in the order of the variables. For example, secondChoice can haveThe program is to print values of three ordered integers variables (firstChoice, secondChoice, thirdChoice) only when the values are not zero. If the value is zero for any integer, the program does not print it. Additionally, a value of zero is only possible if the preceding value is non-zero in the order of the variables. For example, secondChoice can have a value of zero only if firstChoice has a non-zero value.

1 Answer

4 votes

Final answer:

The program is about printing ordered integer variables, excluding zeros, and specifying when zeros are allowed.

Step-by-step explanation:

In this program, you need to print the values of three ordered integer variables (firstChoice, secondChoice, thirdChoice) only if they are not zero. If any of the variables have a value of zero, you should not print it. Additionally, a value of zero is only allowed if the preceding variable in the order is non-zero. For example, if firstChoice has a non-zero value, secondChoice can have a value of zero, but if firstChoice is zero, then secondChoice cannot be zero.

User InnocentKiller
by
7.7k points