3GL Program Design: StepForm algorithms and Trace
Tables
Question set 1
1. What is a trace table?
2. Why should you use trace tables?
3. For each of the problems which follow, construct a stepform algorithm
and a trace table:

Given two numbers X and Y determine which is the largest and display the
largest number.

Given the heights of three buildings find the average height.

If Sunday is day one of the week and Saturday is day seven of the week,
write an algorithm which gets a number and displays the day of the week
as a word.

You have a shopping list of 8 items, each item has a number on the list,
a description and a price: find the total of the shopping list.

With the shopping list from the previous task find the lowest priced item.
Return to the lesson
This publication is copyright Learning Systems 1997
and may not be reproduced by any means without the
written
permission of Learning Systems.
P.O. Box 32, Mowbray, Tasmania, Australia