/* lab9.c
	program will read in workout exercises from a file
	and store the values into the fields of the array 
	of exercises by calling the initArray() function

	then the array will be sent to the printArray()
	function, which resides in another file

	after the array of exercises is filled in, the user
	will be prompted for values for each exercise to
	create their workout plan
*/

#include "defs.h"

int main() {
	int size;
	FILE *inputFile = fopen("exercises.txt", "r");

	fscanf(inputFile, "%d\n", &size);
	exercise exercises[size];

	initArray(size, exercises, inputFile);
	// printArray(size, exercises);
	getWorkout(size, exercises);
	printArray(size, exercises);

	return 0;
}

