diff --git a/test1.py b/test1.py new file mode 100644 index 0000000..ed6de17 --- /dev/null +++ b/test1.py @@ -0,0 +1,10 @@ +x = input('Enter a number = ') +y = len(x)-1 +z = 0 +c = int(x) +while y>=0: + a = c%10 + c = c//10 + z = z + a*(10**y) + y = y - 1 +print(z)