Students are given homework in math, history, and geometry. The given program takes the time (in minutes) spent on each subject as input.
Complete the program to calculate and output the total number of hours and minutes spent on homework, each one on a new line.
35
40
39
1
54
1 hour is 60 minutes. In this case the total amount of spent minutes is 114 (35+40+39), which is equal to 1 hour (the first output) and 54 minutes (the second output).
Use / operator to calculate the hours and % operator for remaining minutes.