Aug 7
Day 3 Homework Solution
icon1 Written by Elliot on August 7, 2008 |

Here’s an extended solution for problem 4 of the day 3 homework.

RANDOMIZE TIMER
DIM count(7) AS INTEGER
WHILE done$ <> "no"
  i = i + 1
  c% = 1 + (RND * 100) MOD 15
  COLOR c%
  roll% = 1 + (RND * 10) MOD 6
  PRINT "Roll #"; i; ":"; roll%
  count(roll%) = count(roll%) + 1
  INPUT "Continue? ", done$
WEND
FOR j = 1 TO 6
  PRINT "Number of"; j; "s:"; count(j)
NEXT j

Can you see what extra features I added?

One Response

  1. Mike Says:

    Wow! Day 3 and you guys already understand this. Very impressive!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.