Here is a more sophisticated version of the average rainfall problem:
Write a program that computes the average rainfall for any number of days.
Here is the program, with some blue blanks:
' Create the array PRINT "How many days to average?" INPUT NUM DIM RAIN( 1 TO _________ ) ' Collect each day's rainfall FOR COUNT = 1 TO _________ PRINT "Input rain for day number "; _________ INPUT RAIN( __________ ) NEXT COUNT ' Add up the rainfall for each day LET SUM = 0.0 FOR COUNT = 1 TO _________ LET SUM = SUM + RAIN( ________ ) NEXT COUNT ' Compute and print the average LET AVERAGE = SUM / ___________ PRINT "The average rainfall is: "; AVERAGE END
Well, of course: Fill in the blanks.