Question: If the value of the integer variable a is 2, square it; if it is 3, input a new value for a ; and if

If the value of the integer variable a is 2, square it; if it is 3, input a new value for a; and if it is 4 or 5, multiply a by 3. Output the new value for a in any case. Consider using a switch statement for this multiple decision

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!