Advertisement
plirof2

ZXBASIC-ATM lesson ver001

Feb 22nd, 2022 (edited)
3,350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -----------TYPE THIS---------
  2. 20 LET BANKMONEY=10000
  3. 500 PRINT "YOU HAVE ";BANKMONEY;" IN BANK"
  4. 600 INPUT "HOW MUCH MONEY YOU WANT?";GETMONEY
  5. 700 LET BANKMONEY=BANKMONEY-GETMONEY
  6. 800 GO TO 500
  7.  
  8. ---------CHECK IF MONEY ARE ENOUGH (add lines 650)---
  9. 20 LET BANKMONEY=10000
  10. 500 PRINT "YOU HAVE ";BANKMONEY;" IN BANK"
  11. 600 INPUT "HOW MUCH MONEY YOU WANT?";GETMONEY
  12. 650 IF GETMONEY>BANKMONEY THEN PRINT "TOO MUCH!!!":GO TO 500
  13. 700 LET BANKMONEY=BANKMONEY-GETMONEY
  14. 800 GO TO 500
  15.  
  16. ----------PIN SUPPORT (add lines 10,100-400)------------
  17.  
  18. 10 LET MYPIN=1234
  19. 20 LET BANKMONEY=10000
  20. 100 PRINT "Welcome to the ATM"'"--------------------"
  21. 200 INPUT "ENTER YOUR PIN:";PIN
  22. 300 IF PIN=MYPIN THEN GO TO 500
  23. 400 PRINT "WRONG PIN!":GO TO 100
  24. 500 PRINT "YOU HAVE ";BANKMONEY;" IN BANK"
  25. 600 INPUT "HOW MUCH MONEY YOU WANT?";GETMONEY
  26. 650 IF GETMONEY>BANKMONEY THEN PRINT "TOO MUCH!!!":GO TO 500
  27. 700 LET BANKMONEY=BANKMONEY-GETMONEY
  28. 800 GO TO 500
  29.  
  30. -----------Question :try TO hack------
  31. 1.MONEY withdraw (700)
  32. 2.ignore PIN (400)
  33.  
  34.  
  35.  
  36.  
  37. -----------final------------
  38. 10 LET MYPIN=1234
  39. 20 LET BANKMONEY=10000
  40. 100 PRINT "Welcome to the ATM"'"--------------------"
  41. 200 INPUT "ENTER YOUR PIN:";PIN
  42. 300 IF PIN=MYPIN THEN GO TO 500
  43. 400 PRINT "WRONG PIN!":GO TO 100
  44. 500 PRINT "YOU HAVE ";BANKMONEY;" IN BANK"
  45. 600 INPUT "HOW MUCH MONEY YOU WANT?";GETMONEY
  46. 650 IF GETMONEY>BANKMONEY THEN PRINT "TOO MUCH!!!":GO TO 500
  47. 700 LET BANKMONEY=BANKMONEY-GETMONEY
  48. 800 GO TO 500
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement