Question: Write a function, ReverseDigit, that takes an integer as a parameter and returns the number with its digits reversed. For example, the value of ReverseDigit

Write a function, ReverseDigit, that takes an integer as a parameter and returns the number with its digits reversed. For example, the value of ReverseDigit(1234) is 4321; the value of ReverseDigit(5600) is 65 ; the value of ReverseDigit(7008) is 8007 ; and the value of ReverseDigit(-532) is -235. Then, call the function from the main function to demonstrate correctness.
Sample Input/Output:
Enter an integer: 609
The number with the digits reversed is: 906
Enter an integer: -1029
The number with the digits reversed is: -9201
Enter an integer: -900
The number with the digits reversed is: -9
 Write a function, ReverseDigit, that takes an integer as a parameter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!