Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Ex1 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int firstPLayerTime = Integer.parseInt(scanner.nextLine());
- int secondPLayerTime = Integer.parseInt(scanner.nextLine());
- int thirdPLayerTime = Integer.parseInt(scanner.nextLine());
- int sum = firstPLayerTime + secondPLayerTime + thirdPLayerTime;
- int minutes = sum / 60;
- int seconds = sum % 60;
- System.out.printf("%d,%02d",minutes,seconds);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement