/* CalcPay.java CIS 160 David Klick 2015-09-09 Calculates gross pay (no overtime) */ import java.util.Scanner; public class CalcPay { public static void main(String[] args) { // declare variables double hours; double rate; double gross; // input hours, rate Scanner kbd = new Scanner(System.in); System.out.print("Enter the hours: "); hours = kbd.nextDouble(); System.out.print("Enter the rate: "); rate = kbd.nextDouble(); // calculate gross gross = hours * rate; // display gross System.out.printf("The gross pay is $%6.2f\n", gross); } }