[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 872
  • Last Modified:

Simple calculating programs

Can somone create this request for me please: i need to see how it works


Service Request SR-kf-008
Tax Calculator


Organization:  Kudler Fine Foods
Locations:        All
Requester:      Harvey Stephens

Description of Request:
Create a tax calculation program for Kudler stores.

Background of Request:
Some food items and all non-food items are subject to a statewide sales tax and local district taxes. Due to differences in district taxes, each store uses a different tax rate.
•      Del Mar - 7.25%
•      Encinitas - 7.5%
•      La Jolla - 7.75%


Expected Results/Impact when completed:
C program that displays the sales tax amount for each store location for a purchase amount of $125.00.

0
Eaddy
Asked:
Eaddy
  • 4
  • 4
  • 2
  • +3
1 Solution
 
ddunleaCommented:
Hi Eaddy,

This is not a place to get people to do your homework for you. If you have a problem with a specific piece of C code, we'll help, but we won't do all the work for you.

Cheers!
0
 
EaddyAuthor Commented:
its not my home work. but true it is home work
and i am trying to get the kid to undersatnd
what i need is to know how this thing works so i can explain i!! nothing more nothing less
0
 
fridomCommented:
Well you wanto explaine something you yoursel does not understand. That will be an interesting outcome.

Now let's see
How can we calculate one tax. We just take the amount and then we either

multiply it by the tax rate and or we divide it with 1 + tax rate if the tax is include.

Regards
Friedrich
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!

 
tarcisCommented:
<Source code removed by Page Editor>
0
 
Prashant SabnekarAVPCommented:
Eddy,
I advise you to start it and ask us if you find any problem, we are allways here.

Regards
Prashant Sabnekar
0
 
EaddyAuthor Commented:
The first time I came to this site and asked about C/C++ was in 1998.  And by doing so I got some books on the topic but my interest in it did not last. Now around 8 years I am ask to help a kid with there homework not remembering how its done but by looking at the question I felt sure it was entry level coding and as long as I found out how it was done I would be able to explain it to another. If I had thought this would get so many people into an argument I would have never posted it.

To the admin::

If you feel this question is not in keeping with the rules of your site please delete it as I do not think I have the option to do so.

Thank you all for your time.

If anyone was upset by anyone’s comment please do not take it to heart and just let it go.

I thank everyone for there time again. And to you all please take care!


Best Regards
Eaddy
0
 
PaulCaswellCommented:
Eaddy,

You have not done wrong. We help with homework and I personally actively encourage helping with homework questions. Please do not be put off by the 'discussion' that is going on here. You will be helped with your problem despite the difficulties.

We have to tread a fine line when it comes to this sort of question. As I pointed out to tarcis, students often believe that pretending that their question is not homework will help them get the help they believe they need. In view of this we have a policy of not posting full-code solutions to questions that even might be homework. Experts sometimes need to be reminded of this.

I hope you can ignore the off-topic posts and let us help you.

Paul
0
 
PaulCaswellCommented:
Eaddy,

Tax calculation, in most countries, is a simple process of adding a percentage of the original amount to the total, just like on your calculator. Here, however, you would need to keep a table of percentages, one for each area, containing the percentage to use. At its most simpel form, this table need not actually be in the form of data but can be code in the form of a switch statement such as:

switch ( area )
{
 case DelMar:
      rate = 7.25;
      break;
     
 case Encinitas:
      rate = 7.5;
      break;
     
 case LaJolla:
      rate = 7.75;
      break;
     
}

This will be the center of your code.

The rest will revolve around getting this working and then calculating the final value.

Clearly, you need to declare a variable called 'rate' which is of type 'float'.
Also you will need to discover the area that the trade is taking place from the data provided. In this case you are only asked to calculate the sales tax amount for each area for an item of value 125.00 so this should be easy to add in.

Is this sufficient help to get you going?

It is actually possible to produce the three values required using an exceptionally simple program that doesnt use the above code at all but that would not help you help your son to understand the process. If you would like to produce that code to start with, go through the process on a calculator and carefully write down the steps you took to get the answers. W can then help you implement that simple maths in a C program.

Paul
0
 
PaulCaswellCommented:
Tarcis,

I woul welcome your help in assisting Eaddy with his question. The technique used in your C++ code would demonstrate the simple solution I mentioned. If you could explain the details behind the process with examples in C I am sure Eaddy would be grateful.

Paul
0
 
fridomCommented:
Pauls is right and you are wrong Tarcis. Full solutions to homework question are not what EE understands under help. Paul is much more forgiving about that as he should, if he deleted the code then for good reasons. BTW this problem is really such a small one, as writen before if you do not have the slightest idea on the basics of C how can you expect to explain it to someone else?

The right answer would have been, Check a decent book about C programming.
The OP has not even shown that he has the slightest idea about what may be involved how can one help someon who does not know or has forgotten what * and / are for?

Friedrich
0
 
EaddyAuthor Commented:
thanks for the help  paul. I got an E-book from a friend,  learn C++ in 21 days(lets see how this works out).
i should be able to get a full undersatnding of the basics over the weekend.

again thanks you for your help
0
 
PaulCaswellCommented:
Hi Eaddy,

No problem! Ask more questions if you get stuck or just find something unclear.

Was the E-Book free? Is it available on the net? If so where?

Paul
0
 
EaddyAuthor Commented:
he sent it to me throw msn
not sure where he got it from. will ask him when comes online later
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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