Author: Owen Dorweiler
Class: Fundementals of Computing
Assignment: Lab 2, Lab Report

The third program (graph.c) works as follows:

From a user perspective, the user simply runs the program and it graphs the equation.

Internally, the program starts by defining three important variables: startX, endX, and step. These variables correspond to the starting x value, the ending x value, and the step size. These are not values the user inputs, but the programmer can change them and it will change the behavior of the program. I did this so validation would be easier and the program would be more flexible.

The program prints the plot title and sets the maximum and minimum values to the values at startX. It then goes steps from startX to endX with the given step size, calculating y, checking to see if it is a new maximum or minimum, and plotting it as a bar graph.

If the new y value is a max or min, it overwrites the previous max or min value.

The program displays two decimal places, but rounds y to the nearest whole number for plotting.

At the end of the program, it displays the maximum and minimum and the x value for each.

I validated the output by comparing it to a graph generated by a graphing calculator, and manually checked the maximum and minumum points.
