a = int(input("Adj meg egy decimális számot: ")) out = "" while a!=0: #round nelkul neha 1.0-at ad c = round(a % 2) out = str(c) + out a = (a-c)/2 print(out)