Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Ex1 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int firstPLayerTime = Integer.parseInt(scanner.nextLine());
  8.         int secondPLayerTime = Integer.parseInt(scanner.nextLine());
  9.         int thirdPLayerTime = Integer.parseInt(scanner.nextLine());
  10.  
  11.         int sum = firstPLayerTime + secondPLayerTime + thirdPLayerTime;
  12.  
  13.         int minutes = sum / 60;
  14.         int seconds = sum % 60;
  15.  
  16.         System.out.printf("%d,%02d",minutes,seconds);
  17.  
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement