Java Programming on how to write an Algorithm

I have a problem here which is required an Algorithm. This problem will display and print the Total Deduction and the Net Salary. And the program is, write an Algorithm to input the basic salary, SSS payment, pag-ibig payment and philhealth payment. Compute the Total Deduction and the Net Salary.

Algorithm:

1. Start the program
2. Input B_salary, SSS_payment, P_payment, Phil_payment
3. Compute T_Deduction, N_salary
T_Deduction=SSS_payment+P_payment+Phil_payment
N_salary=B_salary-T_Deduction
4. Print T_Deduction, N_salary
5. End the program


Variable Definition:

B_salary - Basic Salary
SSS_payment - SSS Payment
P_payment - Pag-ibig Payment
Phil_payment- Philhealth Payment
T_Deduction - Total Deduction
N_salary - Net Salary

In making Algorithm, this is the beginning area of Java Programming. In this area you need to know on how define variable, because spaces in Java Programming is not allowed, only underscore (_) symbol can be consider as space. Take note, space in your variable surely an error. Make a unique baptism of your variable.

You can also visit my new blog, the Talk N Text and ABS-CBN Mobile blog. Hopefully you will enjoy surfing them.
Related Posts Plugin for WordPress, Blogger...