# Definition of table averaging routine module compute-table-averages { uses table-A, table-B returns table-A-avg, table-B-avg table-A-total = 0 table-B-total = 0 table-A-avg = 0 table-B-avg = 0 for i = 1 to 100 add table-A(i) to table-A-total add table-B(i) to table-B-total endfor table-A-avg = table-A-total / 100 table-B-avg = table-B-total / 100 } endmodule