public class TotalHours {
公共课TotalHours {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
double in;
double out;
Scanner sc = new Scanner(System.in);
String choice = "y";
while (choice.equalsIgnoreCase("y")) {
System.out.println("Enter Check in time: ");
in = sc.nextDouble();
System.out.println("Enter Check out time: ");
out = sc.nextDouble();
double calculations;
calculations = out - in;
System.out.println("Total hours of the day: " +calculations);
System.out.print("Calculate another salary? (y/n): ");
choice = sc.next();
System.out.println();
/