Once we have defined a program, we may use it as if it were a primitive operation. For each variable listed to the right of the program name, we must supply one input. Students may have doubts about this model of how the computer works. These doubts are due to wide-spread misconception about computers. No matter at what level we choose to explain the workings of a computer, we always use an approximation.
Many programs consume more than one input.
Let us call these unknown numbers outer and inner . The rest is plain arithmetic. Explain that these exercises demonstrate that programs require a fair amount of domain knowledge . Here the relevant domains are physics, chemistry, business, geometry, and algebra. The first exercise is critical.