Writing a script file for cost of a telephone call according to the following price schedule:
Ältere Kommentare anzeigen
The problem is to write a script that will calculate the cost. I understand that it is a loop problem. I'm lost as to how to define the time. I believe that it has to be converted to 24 hr format to use greater than less than etc.. but any help would be grateful.
5 Kommentare
sixwwwwww
am 29 Okt. 2013
Can you tell roughly what kind of schedule you want to make. For example, if person call for 10 minutes then for the first 5 minutes he is charged 1/min and after that he is charged 0.5/min. Or the schedule depends upon day-time. For example if person call before 12am he is charged 1/min and after 12am he is charged 0.5/am? Can you elaborate your problem
Andrew
am 29 Okt. 2013
Md.Sojon beg sojon
am 24 Jul. 2020
Write a program in a script file that calculates the cost of mailing a small package according to the following price schedule
Md.Sojon beg sojon
am 24 Jul. 2020
Write a program in a script file that calculates the cost of mailing a small package according to the following price schedule:
Type of service
Weight more than 0 kg to 1kg
Weight more than 1 kg to 5kg
Ground
RM1.50
RM1.50+RM0.50 for each kg or fraction of a kg above 1kg.
Air
RM3.00
RM3.00+RM0.90 for each kg or fraction of a kg above 1kg.
Overnight
RM18
RM18.00+RM6.00 for each kg or fraction of a kg above 1kg.
The program asks the user to enter the weight and the type of service. The program then displays the cost. If a weight larger than 5kg is entered a message “Service is not available for packages that weigh more than 5kg” is displayed. Run the program and enter 0.25, 3.2, and 10 kg for Ground and Air service, and 1, 4.1 and 6.5 kg for Overnight service.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Downloads finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
