Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me in C program Digit Swap Ann Britt-Caroline has a safe with a 2-digit code. Occasionally, she types in the code too fast,
Please help me in C program
Digit Swap Ann Britt-Caroline has a safe with a 2-digit code. Occasionally, she types in the code too fast, accidentally swapping the positions of the two digits. She has asked if you could program her safe to check if not only the 2-digit code she entered was correct, but if the code with the two digits swapped is also correct. The first step in programming her safe in this manner is to write a program to swap the digits of a 2-digit code. Input The input consists of a single 2-digit code with only digits 1 to 9 , without any space between the digits. Output Output a single line with the swapped 2-digit code, without any space between the digits. Sample Input 1 Sample Output 1 Sample Input 2 Sample Output 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started