# Thread: help me!!

1. ## help me!!

Please help me in my project using..making a program using C language.

This is the specifications:

I. Overview
1. Create a program that will accept the necessary inputs and generate the proper outputs based on the processing instructions.
2. The program should meet all the requirements.

II. Inputs
1. Employee’s ID Number – an 8 digit integer
1st four digits signifies the year the employee started.
5th digit signifies employment type. 0 for regular, 1 for
contract. Other values are invalid.
Last 3 digits are irrelevant for this program.
2. Salary Grade – a real number
3. Days worked for the month – an integer with valid values of 1 to 31 only.
4. wBonus – a character to signify whether the employee will receive a bonus or not

III. Processing
1. Prompt for all necessary inputs. Check every input for validity.
2. Compute for the employee’s salary for the month.
Basic Salary = Salary grade * Days Worked

For employees with bonus
For regular employees who started before 1990
Bonus = Basic Salary * .4
For regular employees who started before 2000
Bonus = Basic Salary * .3
For regular employees who started before 2006
Bonus = Basic Salary * .2
For regular employees who started after 2005 and contract employees
Bonus = Basic Salary * .1

Salary for the Month = Basic Salary + Bonus

3. Accumulate Total Basic Salary and Total Bonus.
4. Display Employee’s Salary for the Month(output #1)
5. Prompt if the user wants to process another employee. If yes, go back to #1.
6. Display Total Basic Salary and Total Bonus(output #2)

IV. Outputs (use 2 decimal places for real numbers)
1. ID Number and Salary for the Month. Example:
ID Number: 19970123 Salary: P1500.50
2. Total Basic Salary and Total Bonus. Example:
Tot Basic Salary: P180,000.90 Tot Bonus: P20,000.55

V. Requirements
1. Use the printf function for all outputs including prompts.
2. Use the scanf function for accepting/reading all inputs.
3. Use defined constants for the constants used in the bonus computation.
4. Declare/define functions for each routine/subroutine in the program.
5. Use error checking. If the user inputs an invalid value, inform the user and prompt for a new value.
6. Users should be able to use the program without special instructions or training.

I'm looking forward to those who will reply to this .

2. you shouldnt look forward to those who reply to this.

please read the rules here regarding homework. search the forums here for keyword 'homework' and you will get explanations that will be repeated here, and im not going to repeat (or help) until you have read this information and fixed your question.

3. If I answer your question I am posting my code in Java or PHP or PERL or something useless to you in construct while useful to you in principle.

4. You're not specifying what kind of help you need. So I'll give you a couple of general tips:
1) Don't divide by 0.
2) Don't write to unallocated memory
3) Read a good book on C
4) Don't expect us to do your homework

hth,

QuantumPete

5. Aah! Even though the problem is simple for many people here, writing the code isn't like a 5min job. Why would anyone do so for you? Ask for specific help

6. I bet you I could write it in 5 to 10 minutes, and I actually have no problem with doing it in general. I just wonder what makes you think that you would learn something from me writing something on your behalf. Furthermore, if you do not understand the language, what is to stop me from putting stupidity within code that will go undetected by you that will make you memorable to your instructor as being foolish and inefficient? Hypothetically speaking, of course.

7. [quote]
For regular employees who started before 2006
Bonus = Basic Salary * .2
For regular employees who started after 2005 and contract employees
Bonus = Basic Salary * .1
[/code]
isn't this a bit inconsistent? Before 2006 means after 2005... So does that mean 0.2 or 0.1 times basic salary?

--
Mats

Popular pages Recent additions