• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

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
Asked:
nationnon
  • 4
  • 3
  • 2
1 Solution
 
Shay050799Commented:
x = gross pay
x*0.8 = net pay

0
 
nietodCommented:
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
 
nietodCommented:
You can stoart by writting the function declaration, that is the name of the function, its parameters and return value.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
nationnonAuthor 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
 
nationnonAuthor Commented:
nietod,
I've already done that.  

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
 
nationnonAuthor Commented:
Also doesn't * mean multiply?
0
 
Shay050799Commented:
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
 
nationnonAuthor Commented:
OH! One of the reason's i'm using c++ is to help me learn math.  

Thanks!
0
 
Shay050799Commented:
it should be the other way around !!
i think ;-)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now