Homework exercise
I tried to answer the question but I could not. These are my attempts 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 minutess spent on each subject, each on a new line accordingly. Sample lInput 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). import java.util.Scanner; public class Main { Ā Ā public static void main(String[] args) { Ā Ā Ā Ā Ā Ā Scanner scanner = new Scanner(System.in); Ā Ā Ā Ā Ā Ā int math = scanner.nextInt(); Ā Ā Ā Ā Ā Ā int history = scanner.nextInt(); Ā Ā Ā Ā Ā Ā int geometry = scanner.nextInt(); Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā //your code goes here Ā Ā Ā Ā Ā Ā int ma = 35; Ā Ā Ā Ā Ā Ā int his = 40; Ā Ā Ā Ā Ā Ā int geo = 39; Ā Ā } }