< previous page page_487 next page >

Page 487
ing for valid data. As long as the user keeps entering invalid data, the loop continues. Control exits the loop only when the user finally gets it right.
Assumptions: The user processes data for at least one site.
Main                                                                                                                        Level 0
DO
  Get 12 rainfall amounts and sum them
  Print sum / 12
  Prompt user to continue
  Get yes or no response (y or n)
WHILE response is y

Get 12 Amounts (Out: sum)                    Level 1
Set sum = 0
FOR count going from 1 through 12
  Prompt user for a rainfall amount
  Get and verify one rainfall amount
  Add amount to sum

Get Yes Or No (Out: response)
DO
  Read response
  IF response isn't y or n
      Print error message
 WHILE response isn't y or n

 
< previous page page_487 next page >