Loop statement with condition - while




Task
Time limit: 1000 ms,
Memory limit: 256 Mb

Given a natural number N. Get the number obtained by rearranging the digits of the original number in the reverse order. Display the new number and the difference between the original number and the converted

Input: one natural number is entered
Output: In the first line print the number obtained by rearranging the digits of the original number in the reverse order (without insignificant zeros)
In the second line print one number - the difference between the original number and the new number

Example
Input Output
1 2010 102
1908

Prohibited statements:list;[;find;index;reverse;string

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: