High School Mathematics Extensions/Mathematical Programming/Output Routines

Explanation
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).

Global Variables

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.

Function Additions

void output
 * This function calls process to get the value of f(x) and then prints the message f(x)=value.

double process
 * Executes the C implementation for f(x).

Function Changes

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
Add and replace the following code:

Next Step

 * ../Input Revisited/
 * ../The Complete Program/