The input is a four-digit integer N that consists of digits 1-9 except 0. For example, 1234 is such a number. The task is to rotate the digits of N left an right to get two new four-digit number M and P, and compute the product of the M and P. For example, if N is 1234, then M is 2341and P is 4123, and the answer should be 9651943.
A four-digit integer consisting of 1-9 except 0
The product of its left rotation and its right rotation
Note that you do not need to print ‘\n’ at the end of the output.