High School Mathematics Extensions/Mathematical Programming/Exercise 1: Processing Commands

Explanation
Includes

stdio.h conio.h

Type Definitions

Values for TRUE and FALSE to get away from the standard C syntax of just testing for zero / not zero.

Function Prototypes

Prototype so we don't need to worry about forward references.

Global Variables

done = loop control in main. r = denominator(on the right hand side of the operators). l = numerator (on the left hand side of the operators).

Function Definitions init - set global variables. input_message = prompt for a command. input = read command. get_integer = read an integer. retrieve_keypress = look for a keypress. validate = make sure the command is one the program can handle. execute_command = map the command on to the routines to implement it. output_divide = implement divide '/'. output_modulus = implement modulus '%'. output_values = print out l and r.

Code to change
Add and replace the following code:

Next Step

 * ../Exercise 1: Implementing Commands/
 * ../Exercise 1: The Complete Program/