You are on page 1of 1

1.

Total=0
2. Counter=0
3. Repeat
4. Repeat
5. Input num
6. Until num>=0
7. Total=total+num
8. Counter=counter+1
9. Until num=0
10. Average=total/(counter-1)
11. Print avg

How to solve error trapping

1. Select test data(depends upon question)


2. Calculate the result manually
3. Check for the obvious error
4. Rewrite the program with the correction
5. Know enter the test data
6. Compare manually calculated result with the program result
7.

You might also like