Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Seconds {
- public static void main (String[] args){
- Scanner input = new Scanner(System.in);
- int hour1;
- int min1;
- int sec1;
- int hour2;
- int min2;
- int sec2;
- System.out.println("Input first clock time...");
- System.out.println("Hours: ");
- hour1 = input.nextInt();
- System.out.println("Minutes: ");
- min1 = input.nextInt();
- System.out.println("Seconds ");
- sec1 = input.nextInt();
- System.out.println("\nInput second clock time...");
- System.out.println("Hours: ");
- hour2 = input.nextInt();
- System.out.println("Minutes: ");
- min2 = input.nextInt();
- System.out.println("Seconds ");
- sec2 = input.nextInt();
- }
- public static int toSeconds(int hour1, int min1, int sec1, int hour2, int min2, int sec2)
- {
- if(hour1 < 12){
- hour1*3600;}
- min1*60;
- }
- }
- }
Add Comment
Please, Sign In to add comment