The file main.c contains the test driver for A2.

To compile it with your a2.c and a2.h, copy main.c to the directory
which contains those files, and enter the following command:

gcc *.c -lm -o main

To run the driver, enter the following command:

./main
