n=int(input("请输入十进制数:"))
Hex=["A","B","C","D","E","F"]
s=""
while n!=0:
r=n%16
if r>=10:
s=str(r)+s
print("十六进制数为:",s)
微信扫码预览、分享更方便