Solved

Function Question

Posted on 2000-03-05
9
242 Views
Last Modified: 2010-05-18
In a Programmer Defined Function , what would the code be to deduct a percentage (ex 20%) from a gross pay.  fedTax 20%
0
Comment
Question by:nationnon
  • 4
  • 3
  • 2
9 Comments
 
LVL 3

Accepted Solution

by:
Shay050799 earned 10 total points
Comment Utility
x = gross pay
x*0.8 = net pay

0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
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
 
LVL 22

Expert Comment

by:nietod
Comment Utility
You can stoart by writting the function declaration, that is the name of the function, its parameters and return value.
0
 
LVL 1

Author Comment

by:nationnon
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:nationnon
Comment Utility
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
 
LVL 1

Author Comment

by:nationnon
Comment Utility
Also doesn't * mean multiply?
0
 
LVL 3

Expert Comment

by:Shay050799
Comment Utility
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
 
LVL 1

Author Comment

by:nationnon
Comment Utility
OH! One of the reason's i'm using c++ is to help me learn math.  

Thanks!
0
 
LVL 3

Expert Comment

by:Shay050799
Comment Utility
it should be the other way around !!
i think ;-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now