Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 635 Bytes

File metadata and controls

21 lines (15 loc) · 635 Bytes

Primitive Operators

Students are given homework in math, history, and geometry. The given program takes the time (in minutes) spent on each subject as input.

Task

Complete the program to calculate and output the total number of hours and minutes spent on homework, each one on a new line.

Sample Input

35
40
39

Sample Output

1
54

Explanation

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.