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