Write a program in python to enter any single digit number and convert it, into 3 digit number.
n=int(input("Enter the digit in range 1-7: "))
num=n*100+(n+1)*10+(n+2)
print("The three digit number formed: ",num)
Output:-
Enter the digit in range 1-7: 6
The three digit number formed : 678
0 Comments