- 3
Workers at a particular company were given a 17.75% salary increase. Moreover, the increase was retroactive for 2 months,
Workers at a particular company were given a 17.75% salary increase. Moreover, the increase was retroactive for 2 months, that is, effective 2 months ago. Write a java program that takes the employee’s old salary as input and then output the amount of retroactive pay (balance) due the employee and his new salary as well.
3 odpowiedzi
0
Jefferson Sorio , if you would really like to get help, post your attempt here.
0
Java Program:
 double oldMonthlySalary;
        Scanner input = new Scanner(System.in);
        try{
            System.out.print("Enter previous monthly salary: ");
            oldMonthlySalary = input.nextDouble();
            double incSalary = 0.1775;
            double totalIncreaseSal = (oldMonthlySalary*incSalary) + oldMonthlySalary;
            double retroPay = totalIncreaseSal*2;
            System.out.println("Retro Pay for 2 Months: " + retroPay);
            System.out.println("New Monhly Salary: " + totalIncreaseSal);
        }catch(Exception e){System.out.println("Error: "+ e);}



