hi james
remember I told you that i have another program for you to help me with, well here it is
something is wrong again with my calculation.
i have debug it, run through and but still cyah see it.
double gross_sal , netpay , hrswrked = 0, rate_of_pay = 0;
double total_deduct = 0, deduction, fixed_sal = 0;
double loan_interest = 0;
System.out.println("what is the loan officer id number");
String idnum = userinput.next();
System.out.println("please enter loan officer first name");
String officerfirstname = userinput.next();
System.out.println("please enter loan officer last name");
String officerlastname = userinput.next();
System.out.println("what is loan officer fixed salary");
double fixedsal = userinput.nextDouble();
System.out.println("please enter total interest in all loans issued month");
loan_interest = userinput.nextDouble();
System.out.println("loan officer NIS contribution");
double NIS = userinput.nextDouble();
double hrs = (hrswrked * rate_of_pay);
gross_sal = fixed_sal -(0.3 * loan_interest);
deduction = (8.50 + NIS + loan_interest);
netpay= (gross_sal - total_deduct);
System.out.println("loan officer payslip");
System.out.println("the loan officer id is " + idnum);
System.out.println("the loan officer first name is " + officerfirstname + "\t"+ officerlastname);
System.out.println("the loan officer total deduction is: $" + total_deduct);
System.out.println("the loan officer gross pay is:$ " + gross_sal);
System.out.println("the loan officer net pay is:$ " + netpay);
}
}
this is the output
what is the loan officer id number
W1200S
please enter loan officer first name
wendell
please enter loan officer last name
saunders
what is loan officer fixed salary
5400
please enter total interest in all loans issued month
8
loan officer NIS contribution
185
loan officer payslip
the loan officer id is W1200S
the loan officer first name is wendell saunders
the loan officer total deduction is: $0.0
the loan officer gross pay is:$ -2.4
the loan officer net pay is:$ -2.4
BUILD SUCCESSFUL (total time: 31 seconds)