Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. @echo off &setlocal
  2. title TheLottery
  3. set/a wins=0
  4. :Start
  5. cls
  6. echo choose your numbers. 1-10 only!
  7. set/p n1=1st:
  8. set/p n2=2nd:
  9. set/p n3=3rd:
  10. set/p n4=4th:
  11. set/p n5=5th:
  12. set/p n6=6th:
  13. :play1
  14. if not "%n1%"=="%random% %% 10" goto play2
  15. set/a wins="%wins% + 1"
  16. :play2
  17. if not "%n2%"=="%random% %% 10" goto play3
  18. set/a wins="%wins% + 1"
  19. :play3
  20. if not "%n3%"=="%random% %% 10" goto play4
  21. set/a wins="%wins% + 1"
  22. :play4
  23. if not "%n4%"=="%random% %% 10" goto play5
  24. set/a wins="%wins% + 1"
  25. :play5
  26. if not "%n5%"=="%random% %% 10" goto play6
  27. set/a wins="%wins% + 1"
  28. :play6
  29. if not "%n6%"=="%random% %% 10" goto draw
  30. set/a wins="%wins% + 1"
  31. :draw
  32. cls
  33. echo You got %wins% numbers right.
  34. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement