Computer Science

Write a program to take a 2-digit number and then print the reversed number. That is, if the input given is 25, the program should print 52.

Python

Python Data Handling

92 Likes

Answer

x = int(input("Enter a two digit number: "))
y = x % 10 * 10 + x // 10
print("Reversed Number:", y)

Output

Enter a two digit number: 25
Reversed Number: 52

Answered By

46 Likes


Related Questions