Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lessons;
- // given an employees pay rate of $25/hour and overtime of $37.50/hour
- // write a program to calculate gross pay
- //if they work 40 reg hours and 10 overtime
- public class Wages
- {
- public static void main(String[] args)
- {
- int totalReg,regPay = 25, regHour = 40, overtimeHour = 10;
- float grossPay, totalOver, overtimePay = 37.50f;
- totalReg = regPay * regHour;
- totalOver = overtimePay * overtimeHour;
- grossPay = totalReg + totalOver;
- System.out.println("the employees gross pay is: "+grossPay);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement