Advertisement
Guest User

ATM

a guest
Sep 23rd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. while(0<1):
  2.     money = int(input("ใส่จำนวนเงินที่ต้องการ:"))
  3.     if money >= 100 and money <= 20000:
  4.         print("1000 บาท:",money//1000 )
  5.         money = money % 1000;
  6.         print("500 บาท:",money //500 )
  7.         money = money % 500;
  8.         print("100 บาท:",money //100 )
  9.         money = money % 100;
  10.     else:
  11.           print("จำนวนเงินที่ต้องการต้องมากกว่า 99 และต่ำกว่า 20,000")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement