Question: Write a program that reads two integers and a character. If the input character is the letter y . your program swaps the two integers
Write a program that reads two integers and a character. If the input character is the letter y your program swaps the two integers and then prints the result. Otherwise, your program displays the string No swap!".a Input and output samples:i The input character is the letter y:abil The input character is not the letter y:nNo swap!y or n are input from the keyword. a and b are variable names.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
