• Status: Solved
• Priority: Medium
• Security: Public
• Views: 282

# Function Question

In a Programmer Defined Function , what would the code be to deduct a percentage (ex 20%) from a gross pay.  fedTax 20%
0
nationnon
• 4
• 3
• 2
1 Solution

Commented:
x = gross pay
x*0.8 = net pay

0

Commented:
We cannot provide answers to school assignments.  That is grounds for removal from this site.  (for both you and the experts involved.)  We can provide only limitied help in accademic assignments.    We can answer specific (direct) questions, like you might ask your teacher.  We can review your work and post suggestions, again, like your teacher might do.

Do you have specific questions?
Do you have any work on this (incomplete even) that we can review?
0

Commented:
You can stoart by writting the function declaration, that is the name of the function, its parameters and return value.
0

Author Commented:
FYI, If you were to answer my question it wouldn't be the answer to my school assignment, it would only be the answer to my Programmer Defined Function.

0

Author Commented:
nietod,

shay,
I don't understand why it would be
x*0.8 = net pay when 20% should be taken from the gross pay.  If 0.8 was the percentage that would mean 80% is taken from the gross pay. Am I missing something?

0

Author Commented:
Also doesn't * mean multiply?
0

Commented:
u want to deduct 20% off the gross sallary right ?
that mean that u end up with 80% of ur gross sallary
so multiply ur gross sallary by 80% and thats ur net sallay
0

Author Commented:
OH! One of the reason's i'm using c++ is to help me learn math.

Thanks!
0

Commented:
it should be the other way around !!
i think ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.