- 1
pls help me,use java
Students are given homework in math, history, and geometry. Write a program that takes the time spent on each subject as input, and calculates and outputs the total number of hours and minutes spent on each subject, each on a new line accordingly. Sample Input 35 40 39 Sample Output 1 54 Explanation The total amount of spent minutes is 114, which is equal to 1 hour (the first output) and 54 minutes (the second output).
2 Respostas
+ 5
Please share your code..Else try the following steps:
● Just take input in 3 variables (or in array of length 3)
● Do sum of all inputted values
● Divide sum by 60 and store quotient and variable hours(use division operator), and reminder in variable minutes (use modulo operator)
● Print hours and minutes variable
0
thanks