CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Posts
    6

    Algorithm Help Please!

    I know Im pretty new on this site but i dont know where else to go. Im pretty clueless on algorithms and how to do them. Please help.

    This is a worksheet he gave us.

    1) Write the algorithm.
    2) Using VISIO, draw the Flowchart.

    Mrs. Butterworth received a computer for her local business to assist her with her day to day activities. She has a request for you to develop a solution/program to the following problem/opportunity:

    When a customer comes in to her fudge shop, they may purchase more than one type of fudge flavors. The current process is for her to enter one purchase and then calculate the taxes on that one purchase for a total bill.

    For example one: (Only one sale)

    One Pound Chocolate Fudge $4.99
    Sales Tax at 6% $0.30

    Final Cost $5.29

    For example two: (Multiple sales)

    One Pound Chocolate Fudge $4.99
    One Pound Peanut Butter Fudge $5.49
    Two Pounds Vanilla Cluster $11.89
    One Pound Cherry Nut Fudge $3.99

    Total Purchase $26.36
    Sales Tax at 6% $1.58

    Final Cost $27.94

    Design the logic using an algorithm and flowchart to have Mrs. Butterworth input the sale for one item and calculate the total due. Purchase price plus taxes equal total due. See Example One.

    Challenge: Have the option to continue entering more sales. Once all the sales have been entered, multiply the total sales by .06%. Add the total purchase and sales tax to arrive at the final cost. Display the results and print out a receipt when the order is completed. See Example 2.


    Can someone maybe start me out or explain what i would do first?
    Last edited by lepinat0r; June 3rd, 2007 at 03:56 PM.

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Algorithm Help Please!

    Please see signature below...
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Sep 2006
    Posts
    6

    Re: Algorithm Help Please!

    k.. Well. I dont really understand any of it. Like where do i start?

    on an algorithm to my house it is easy because i have done it so many times. But this, Idk. if someone could just maybe tell me where to start on it i guess. Or maybe explain in lamens terms for me.
    Last edited by lepinat0r; June 3rd, 2007 at 03:53 PM.

  4. #4
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Algorithm Help Please!

    Quote Originally Posted by lepinat0r
    k.. Well. I dont really understand any of it. Like where do i start?

    on an algorithm to my house it is easy because i have done it so many times. But this, Idk. if someone could just maybe tell me where to start on it i guess. Or maybe explain in lamens terms for me.
    First: What part of this link http://www.codeguru.com/forum/showthread.php?t=366302 do you not understand?

    Second: Write out the instructions to accomplish the goal, step by step, as if you were talking to a person who never counted items, never added up totals, never calculated tax, etc...
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  5. #5
    Join Date
    Sep 2006
    Posts
    6

    Re: Algorithm Help Please!

    I just have no idea to word it. But would this be close?


    Ask number of Purchase
    Ask price of Item
    If Purchase is 1 then
    calculate item * $0.06 for total

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured