Question: Write an algorithm in c language: If a user inputs an integer value 1 or 2, the value of 1 is assigned to a variable

Write an algorithm in c language: If a user inputs an integer value 1 or 2, the value of 1 is assigned to a variable 'x' and variable 'y' is assigned value 0. But if the user inputs integer value 3 or greater, the value of variable 'y' is 1 and variable 'x' is 0. NOTE: do not use selection structures (else/if and switch cases are not allowed)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
