Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /*
- * Created by todor on 17.01.2017 г..
- */
- public class u07_SumSeconds {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int time1 = Integer.parseInt(scan.nextLine());
- int time2 = Integer.parseInt(scan.nextLine());
- int time3 = Integer.parseInt(scan.nextLine());
- int timeSum = time1 + time2 + time3;
- int minutes = timeSum / 60;
- int seconds = timeSum % 60;
- System.out.printf("%d:%02d", minutes, seconds);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement