Programming Fundamentals
28 กันยายน 2558
Lab5 - convert a number from base 10 to base 2
def setup():
base10 = 19
base2 = ""
while (base10 > 0 ):
base2 = str(base10%2)+base2
base10 = base10//2
print(base2)
print(base2)
setup()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น
บทความใหม่กว่า
บทความที่เก่ากว่า
หน้าแรก
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น