Question: The following decision statement uses a compound condition to determine whether a character variable named choice contains 'Q' or 'q': if( choice == 'Q' or
The following decision statement uses a compound condition to determine whether a character variable named choice contains 'Q' or 'q': if( choice == 'Q' or choice == 'q' ) Re-write (simplify) the decision statement so that it uses a simple condition (ie. a single condition) to test for only uppercase 'Q' but will produce the same result if choice contains 'q'.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
