Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ExcersiseProverki;
- import java.util.Scanner;
- public class SumSeconds {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int Player1 = Integer.parseInt(scanner.nextLine());
- int Player2 = Integer.parseInt(scanner.nextLine());
- int Player3 = Integer.parseInt(scanner.nextLine());
- int Sum = Player1 + Player2 + Player3;
- int minutes = Sum / 60;
- int seconds = Sum % 60;
- if (seconds < 10) {
- System.out.printf("%d:0%d,", minutes , seconds );
- } else {
- System.out.printf("%d:%d", minutes , seconds );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement