Does anyone know how to do problem 27 in chapter 6

1 Ansicht (letzte 30 Tage)
Ethan
Ethan am 9 Nov. 2014
Beantwortet: Image Analyst am 9 Nov. 2014
The problem asks you to write a program in a script file that calculates the cost of shipping a package according to a table. It then says, the program asks the user to enter the type of service (Ground,Express, or Overnight) and the weight of the package (two numbers. First for number of pounds and second for number of ounces.) The program then displays the cost for the shipment. Run the program three times for the following cases: a.Ground 2 lb 7 oz. b. Express 0 lb 7 oz. c. Overnight 5 lb 10 oz.
  3 Kommentare
Jan
Jan am 9 Nov. 2014
What is your question? What have you tried so far and which problems occur?
per isakson
per isakson am 9 Nov. 2014
Bearbeitet: per isakson am 9 Nov. 2014
There's no reference to a book!

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 9 Nov. 2014
Hints. the way I'd do it is to use a crude GUI-based approach rather than an even cruder command window-based approach. So I'd use these functions
  1. menu() - to get the type of service
  2. inputdlg() - to ask user for some numbers
  3. sprintf() - to create a string for displaying the result
  4. helpdlg() or msgbox() - to display the string.
There is help documentation on all of these, with examples I believe. Come back if you have any questions about your code.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by