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. ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-15-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:01 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 07:00 AM |
| Apple II Csa2 FAQs: Telecom Hardware & Transfers, Part 20/25 | rubywand@swbell.net | Tech FAQ | 0 | 04-04-2004 08:29 AM |