Program

You can find the final program below: