digit order
This commit is contained in:
parent
104be53ebe
commit
6e182d0c2a
10
digit.order.2.py
Normal file
10
digit.order.2.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
n = int(input('Bir sayı giriniz:'))
|
||||
|
||||
digits = []
|
||||
while n > 0:
|
||||
r = n % 10
|
||||
digits.append(r)
|
||||
n //= 10
|
||||
|
||||
for digit in reversed(digits):
|
||||
print(digit, end=' ')
|
5
digit.order.py
Normal file
5
digit.order.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
n = int(input('Bir sayı giriniz:'))
|
||||
s = str(n)
|
||||
for c in s:
|
||||
print(c, end=' ')
|
||||
|
Loading…
Reference in New Issue
Block a user