“C” for engineers homework

you will see in the attached document what the homework is about. 

please use the simplest code you can.