共計 217 個字符,預計需要花費 1 分鐘才能閱讀完成。
可以使用如下代碼來判斷三個數的大?。?/p>
a = int(input(" 請輸入第一個整數:"))
b = int(input(" 請輸入第二個整數:"))
c = int(input(" 請輸入第三個整數:"))
if a > b and a > c:
print(f"{a} 最大 ")
elif b > a and b > c:
print(f" 最大 ")
else:
print(f"{c} 最大 ")
用戶輸入三個整數后,程序會比較這三個數的大小,并輸出最大的數。
丸趣 TV 網 – 提供最優質的資源集合!
正文完