There really is no hope of making this code even half-way decent without spending the time to rewrite them all properly. Don't want to do any of that
16 lines
248 B
Python
Executable File
16 lines
248 B
Python
Executable File
eingabe = int(input("Zahl im Dezimalsystem: "))
|
|
system = int(input("Zahlensystem: "))
|
|
|
|
y = eingabe
|
|
out = 0
|
|
stelle = 1
|
|
|
|
while y > 0:
|
|
y = y // system
|
|
outadd = y % system
|
|
out += outadd * stelle
|
|
stelle *= 10
|
|
|
|
|
|
print(out)
|