Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3: Reversing a Number (20 pts) In this problem you will implement a function called myReverse() that, given a single input inputNum which is
Problem 3: Reversing a Number (20 pts) In this problem you will implement a function called myReverse() that, given a single input inputNum which is a 4- digit positive integer (i.e., an integer between 0 and 9999), returns an integer which is the number in reverse. For example myReverse(1234) should return 4321 and myReverse(5) should return 5000. You must use the % function at least once! HINT: Create four variables called one_digit, ten_digit, hundred_digit, and thousand_digit
Step 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