Just one slot changed -- RAIN(1)
You can read in data for an array one by one. Here is the rainfall program again, but this time the user enters the data:
DIM RAIN(1 TO 3) ' The array will store the rainfall ' ' Collect data from the user PRINT "Enter rainfall for day 1:" INPUT RAIN(1) PRINT "Enter rainfall for day 2:" INPUT RAIN( ______ ) PRINT "Enter rainfall for day 3:" INPUT RAIN( ______ ) LET SUM = RAIN(1) + RAIN(2) + RAIN(3) ' Add up the rainfall for all three days LET AVG = SUM / 3 PRINT "The average rainfall was:", AVG, " inches" END
Fill in the blanks of the program.