Help, please explain to me more

This is a discussion on Help, please explain to me more within the C++ Programming forums, part of the General Programming Boards category; A mail order house sells five different products whose retail price are product 1-$ 2.98, product 2- $4.50, product 3- ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    4

    Help, please explain to me more

    A mail order house sells five different products whose retail price are product 1-$ 2.98, product 2- $4.50, product 3- $ 9.98, product 4- $4.49 and product 5- $ 6.87. write a program that reads a series pf pairs of numbers as follows:

    1. Product number.
    2. Quantity sold for one day.

    and then it says: Your program should use a (switch statement) to help determine the retail price for each product.
    Your program should calculate and display the total retail value of all product sold last week.

    Could you please explain it more to me and what does it mean by Switch Statement??
    And in how many ways can I solve this??In If statements or Loops or Normal Statements??

  2. #2
    Bioport Productions
    Join Date
    Oct 2005
    Posts
    215
    you should read a tutorial on switch statements, they are all over google! Here's some psuedocode that might help:

    1: Have the user enter the product number.
    2: Have the user enter the amount of products sold.
    3: Loop through until user has entered all of the desired products that were sold.
    4: multiply each products value by the number that was sold with a switch statement
    5: add them all and display results
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:
    sadf 

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Could you please explain it more to me and what does it mean by Switch Statement??
    It's explained in the first few chapters of any beginning C++ book. Look around near the section that explains if statements.

  4. #4
    ~Team work is the best!~ wakish's Avatar
    Join Date
    Sep 2005
    Posts
    85

  5. #5
    Registered User
    Join Date
    Oct 2005
    Posts
    4
    Thanks a lot for your help.I am very gratefull to you.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 08-23-2008, 01:16 PM
  2. Please Explain me few terms that i have listed in here.
    By chottachatri in forum C++ Programming
    Replies: 3
    Last Post: 02-26-2008, 07:20 AM
  3. Can someone explain to me what this code means
    By Shadow12345 in forum C++ Programming
    Replies: 3
    Last Post: 12-22-2002, 11:36 AM
  4. explain this loop statement?
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 05-05-2002, 02:46 AM
  5. Can someone explain "extern" to me?
    By valar_king in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2001, 12:22 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21