Redesign the program that computes an average from a list of data. The new program should have a main module called compute_average and three subordinate modules: initial_processing, detail_processing, and final_processing.

What will be an ideal response?

```
compute_average
CALL initial_processing DO WHILE num < 9999
CALL detail_processing
LOOP
CALL final_processing
initial_processing
LET sum = 0 LET count = 0 INPUT num
detail_processing
LET sum = sum + num LET count = count + 1 INPUT num
final_processing
IF count > 0 THEN
LET average = sum / num
OUTPUT "The average is ", average
ELSE
OUTPUT "There is no data to average"
END IF
```

Computer Science & Information Technology

You might also like to view...

A(n) ________ is a series of screens that guides a user through a task

A) tab B) template C) wizard D) theme

Computer Science & Information Technology

When a query with a(n) ________ is run, only the records where the value in the common field exists in both related tables are displayed in the query results

A) cross join B) inner join C) unequal join D) outer join

Computer Science & Information Technology