mardi 10 mars 2015

i am a new csci student and i'm facing a issue with this one any help please [on hold]




  1. Write a program that calculates the weekly salary of an employee. The employee works 5 days a week from 9:00 a.m. till 4:00 p.m. The employee is not allowed to leave work before 4:00 p.m., but he/she may stay after 4:00 p.m. as overtime. The normal hourly rate is 7$ while the overtime hourly rate is 1.5*hourly rate.


3% tax is deducted from the weekly salary and thus the employee earns a net salary which is equal to the salary after deducting the tax. Your program should read the time the employee left work for all the working days in a week, then calculate and display the weekly salary, the tax as well as the net weekly salary. Assume that the leaving time of the employee is always an integer. Assume also that the employee enters correct and valid values while running the program. Sample run:


Please enter the time you left on Monday: 4 Please enter the time you left on Tuesday: 5 Please enter the time you left on Wednesday: 6 Please enter the time you left on Thursday: 4 Please enter the time you left on Friday: 4


Your total weekly salary is 276.5 $ The tax in your salary is 8.295 $ Your net salary is 268.205 $




Aucun commentaire:

Enregistrer un commentaire