UVa10929 - You can say 11 (Python) while 1: try: num = int(input()) if num == 0: break if num%11 == 0: print(f"{num} is a multiple of 11.") else: print(f"{num} is not a multiple of 11.") except: pass 1. 要對input的部分進行例外處理2. 收到0時結束 以電子郵件傳送這篇文章BlogThis!分享至 X分享至 Facebook
0 comments:
張貼留言