Writing a script file for cost of a telephone call according to the following price schedule:
Mostrar comentarios más antiguos
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 comentarios
sixwwwwww
el 29 de Oct. de 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
el 29 de Oct. de 2013
Md.Sojon beg sojon
el 24 de Jul. de 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
el 24 de Jul. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Downloads en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
