This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ADD 1 TO IterCount END-PERFORM DISPLAY "Finished in line Perform." INITIALIZE Itercount DISPLAY "Enter a stream of up to 99 numbers." DISPLAY "Each number must be in the range 1-99. Enter 0 to stop." DISPLAY "Enter number :- " WITH NO ADVANCING ACCEPT UserInput PERFORM GetUserInput UNTIL EndOfUserInput OR MaxCountReached DISPLAY "The final total is - " RunningTotal DISPLAY "The final count is - " IterCount COMPUTE AverageValue = RunningTotal / IterCount DISPLAY "The average value entered is - " AverageValue STOP RUN. GetUserInput. ADD UserInput TO RunningTotal ON SIZE ERROR DISPLAY "Error - new total too large for data-item." NOT ON SIZE ERROR ADD 1 TO IterCount END-ADD END-ADD DISPLAY "Total so far is - " RunningTotal DISPLAY "Count so far is - " IterCount DISPLAY "Enter number :- " WITH NO ADVANCING ACCEPT UserInput....
View Full Document
This note was uploaded on 03/02/2011 for the course COMPUTER A BCA taught by Professor Nandakumar.g during the Spring '11 term at University of Madras.
- Spring '11