Accept a three digit number such that the difference between the first and last digit is 2.If not then print a message "Wrong Input" . Reverse the number and calculate the absolute difference between the original number. Print the result. Write a program in Java to do the above task. Sample Input: 143
3-1 = 2
Sample output: Reverse of the number = 341
341-143=198
Share
0 Replies