Workers at a particular company were given a 17.75% salary increase. Moreover, the increase was retroactive for 2 months, | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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.

4th Oct 2021, 4:50 AM
Jefferson Sorio
3 Answers
0
Jefferson Sorio , if you would really like to get help, post your attempt here.
4th Oct 2021, 6:37 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
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);}
17th Oct 2021, 2:50 PM
Arnold Gingoyon
Arnold Gingoyon - avatar