Question: Randomly generate an integer number in range [10, 99]. Check if the digit at 10s position is less than the digit at 0s position. If
Randomly generate an integer number in range [10, 99]. Check if the digit at 10s position is less than the digit at 0s position. If yes, swap these 2 digits to generate a new number. Display original number and new number. For example, if the number is 43, after process, the new number will be 34. If original number is 12, no process needed. If the number is 50, the new number will be 5.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
