Wednesday, March 2, 2011

IT - 406 Quiz1

Using else if

Prob.) Write a program that asks the user for the hours worked for the week and the hourly rate. The basic salary is compute as:

Salary = hours worked * hourly rate

Bonuses are given:

No. of hours > 45 Bonus of 500 pesos

No. of hours > 40 and <=45 Bonus of 250 pesos

No. of hours > 35 and <= 40 Bonus of 150 pesos

Display the basic salary, bonus and the total salary (basic salary + bonus) for the week.

No comments:

Followers

Visitor

free counters

FEEDJIT Live Traffic Feed