Advertisement
amigojapan

random 1 to 100 in BASIC

Mar 13th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. procedure One_to_100:
  2.  
  3. GOSUB Zero_to 50:
  4.  
  5. A=Randum_number_Zero_to_50
  6.  
  7. GOSUB Zero_to 50:
  8.  
  9. B=Randum_number_Zero_to_50
  10.  
  11. if B=0 then B=1
  12.  
  13. Randum_number_Zero_to_100=A+B
  14.  
  15. end
  16.  
  17.  
  18. procedure Zero_to 50:
  19.  
  20. procedure while_not_zero:
  21.  
  22. Randum_number_Zero_to_50=firstRollofDice times 10 plus second roll of dice minus 11
  23.  
  24. if(Randum_number_Zero_to_50<0) GOTO while_not_zero
  25.  
  26. RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement