Make a copy of the program you wrote for the previous assignment (assignment
5, program 4), and modify that copy so that each of the functions you
defined returns its result by modifying one or more pass-by-address
parameters, rather than by using a return statement. That is, all
user-defined functions in the program must have return type
void
, and the keyword
return
must not be used in any function definition.
However, your program still must keep track of the result of the previous
computation so that the redisplay option can be implemented. As always,
you are not allowed to use any global variables.
This program should have the same functionality as the previous program, so that users of the program will still be able to do all of the same things. However, you can improve the user interface if you like.
To hand in: