High School Mathematics Extensions/Mathematical Programming/Output Routines
Two new global variables were added: double x_val and double delta.
Two new functions were added: void output() and double process().
One function was changed: void execute_command(char command).
double x_val: the value for x that is passed to f(x).
double delta: the value by which x is changed when the + or - commands are executed.
- This function calls process to get the value of f(x) and then prints the message f(x)=value.
- Executes the C implementation for f(x).
void execute_command(char command)
- Called the new function output to display f(x)=value.
- Implements the '-' and '+' commands for the variables x_val and delta.
Code to change