Results 1 to 2 of 2
  1. #1
    Juice Jay is offline Member
    Join Date
    Nov 2012
    Location
    Caribbean
    Posts
    4
    Rep Power
    0

    Default Control Statement/ Switch Statements

    can Someone Please show me the code for this question..
    I'm having problem with switch statements..
    I Just really need to see an example of a code to use for my backbone to go from there..
    i wanna master all the control statements but im having serious problems with the switch..
    Your help will be greatly appreciated.. thanks



    An online retailer sells five products whose retail prices are as follows:
    Product 1, $2.98; product 2, $4.50; product 3, $9.98; product 4, $4.49 and product 5, $6.87.
    Write an application that reads a series of pairs of numbers as follows:
    a) product number
    b) quantity sold
    Your program should use a switch statement to determine the retail price for each product. It
    should calculate and display the total retail value of all products sold. Use a sentinel-controlled
    loop to determine when the program should stop looping and display the final results.

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

Similar Threads

  1. Replies: 3
    Last Post: 11-19-2012, 08:12 PM
  2. Replies: 2
    Last Post: 03-26-2012, 04:27 PM
  3. switch statements & conditionals
    By linkxs in forum New To Java
    Replies: 7
    Last Post: 09-25-2011, 06:17 AM
  4. Using IF statement to control return statements.
    By Teclis in forum New To Java
    Replies: 21
    Last Post: 04-16-2011, 08:42 AM
  5. switch statements
    By jim01 in forum New To Java
    Replies: 7
    Last Post: 04-10-2011, 10:52 PM

Posting Permissions

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