7.7 Trace Tables
7.7 Trace Tables
Example:
N1 N2 Sum Output
Trace Tables
1. This flowchart inputs 5 numbers and finds the sum of these numbers
START
Total 0
Count 0
Distinction 0
INPUT Mark
No
No Is OUTPUT "Number of
Mark >= Distinctions ", Distinction
80 OUTPUT "Average Mark "
? Total/Count
Yes
Complete the trace table for the mark input data: 50, 70, 65, 30, 95, 50, 55, 85, 65, 35, –1, 45
[4]
To test this algorithm you are given the following test data:
1.8, 2.0, 1.0, 1.3, 1.0, 2.5, 2.0, 1.3, 1.8, 1.3, -1