
- Forum
- Programming Talk
- C and C++
- c program to calculate salary
c program to calculate salary
This is a discussion on c program to calculate salary within the C and C++ forums, part of the Programming Talk category; kofi company limited has a number of employees.each employee recieves a basic salary and allowance base on hours worked. first ...
-
01-10-2008, 10:52 AM #1
- Join Date
- Jan 2008
- Answers
- 1
c program to calculate salary
kofi company limited has a number of employees.each employee recieves a basic salary and allowance base on hours worked. first 15hours @20 dollars per hour,
next 10hours @15dollars per hour and any remainder is @ 12.5dollars per hour.
each employee pays %5 of his gross as social security contribution.write a c programe to display 1:name, 2:basic allowance, 3:number of hours worked,4:allowance, 5:net salary of each employee.
-
I will give you the logic for this program so that you can make a try. If you have any problems in coding the same, let me know I will give you the program
* Define a structure having name of empcode, employee name, age, sal, day, month and year of joining date, basic salary, and hours worked, allowance, net salary as members of the structure.
* Have a file defined and open the file and get the details of a employee as input.
* calculate the amount field based on input of hours worked namely as
first 15hours @20 dollars per hour,
next 10hours @15dollars per hour and any remainder is @ 12.5dollars per hour
and store the final result in amount
* calculate GS = basic salary + amount calculated before
* calculate SSC=(GS*5)/100
* calculate NS=GS-SSC
* write all details as a record in file
* proceed with next record
-
please can i get a programme in BASIC or FORTRAN to calculate a worker's take home pay? THANKS
-
Sponsored Ads
«
how to make the password in to asterisk and asign a exact password for char.
|
Library Data base management system
»

Reply With Quote





