Exforsys

Online Training

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. ...


Go Back   Exforsys > Programming Talk > C and C++

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-10-2008, 11:52 AM
Junior Member
 
Join Date: Jan 2008
Posts: 1
onlyworkus is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-20-2008, 04:06 PM
Member
 
Join Date: May 2006
Posts: 47
blenda is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

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


All times are GMT -4. The time now is 03:50 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.