1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
liberstina [14]
3 years ago
8

29. Write a program in a script file that calculates the cost of renting a car according to the following price schedule: The pr

ogram asks the user to enter the type of car (sedan or SUV), the number of days, and the number of miles driven. The program then displays the cost (rounded to cents) for the rent. Run the program three times for the following cases: (a) Sedan, 10 days, 769 miles. (b) SUV, 32 days, 4,056 miles. (c) Sedan, 3 days, 511 miles.
Computers and Technology
1 answer:
Lilit [14]3 years ago
4 0

Answer:The price for renting a car at a car rental company is according to the following schedule: Write a MATLAB program in a script file that calculates the cost of renting a car based on the shown price schedule. The program must ask the user to enter the type of car (Sedan or SUV), the number of days, and the number of miles driven. The program then displays the cost (rounded to cents) for the rent in a sentence that reads: "The cost of the rent is XXX $." where XXX is the cost value in $. Run the program three times for the following cases: Sedan, 10 days, 769 miles. SUV, 32 days, 4, 056 miles. Sedan, 3 days, 511 miles. Use fprintf () to display the text and data. The data should be displayed in f format with two decimal digits.

Explanation:

You might be interested in
The power we use at home has a frequency of 60 HZ. What is the time period of such a power?
Digiron [165]

Answer:

The period of the power for our lights at home is 0.0116 s, or 16.6 ms.

6 0
4 years ago
The largest type of computer system with the most extensive storage capacity and the fastest processing speeds is a ________.
azamat
Super Computer. Hope I helped.
5 0
3 years ago
Im being timed please help!!
astra-53 [7]

Answer:

ALL

Explanation:

Because if it was a test you can ask a teacher, if it was group projects you can ask the study group, if it was homework or 1 on 1  you can ask a tutor

7 0
4 years ago
Read 2 more answers
Give an example of an operationin a programming languagethat is implemented.
Shtirlitz [24]

answer:  

(i) #include <iostream>  

using namespace std;  

int main() {  

int n1,n2,max;  

cin>>n1>>n2;  

if(n1>n2)//finding maximum between n1 and n2 in the program directly.  

max=n1;  

else  

max=n2;  

cout<<max;  

return 0;  

}  

(ii)  

#include <iostream>  

using namespace std;  

int maximum(int n1 ,int n2)  

{  

if(n1>n2)//finding maximum between n1 and n2 using function.  

return n1;  

else  

return n2;  

}  

int main() {  

int n1,n2,max;  

cin>>n1>>n2;  

max=maximum(n1,n2);  

cout<<max;  

return 0;  

}  

(iii)  

#include <iostream>  

using namespace std;  

inline int maximum(int n1 ,int n2)  

{  

return (n1>n2)? n1:n2;  

}  

int main() {  

int n1,n2,max;  

cin>>n1>>n2;  

max=maximum(n1,n2);//Finding maximum using inline function.  

cout<<max;  

return 0;  

}  

Output:-  

54 78  

78  

all three codes give the same output.  

Explanation:  

In part (i) I have done the operation in the main function directly.  

In part(ii) I have used function to calculate the maximum.  

In part(iii) I have used inline function to calculate maximum.  

4 0
3 years ago
Which device assists with medical imaging? HELPPPP!!!!!!
FinnZ [79.3K]

Answer:

<h2><u>Medical imaging equipment are manufactured using technology from the semiconductor industry, including CMOS integrated circuit chips, power semiconductor devices, sensors such as image sensors (particularly CMOS sensors) and biosensors</u></h2>

Explanation:

7 0
4 years ago
Other questions:
  • Redo Programming Exercise 16 of Chapter 4 so that all the named constants are defined in a namespace royaltyRates. PLEASE DONT F
    14·1 answer
  • A benefit of IPsec is __________.
    8·1 answer
  • If the pc-doctor software is installed on a computer's hard drive, what two different ways can the program be started?
    9·1 answer
  • A raised dot (ú) shows where the ENTER key was pressed. <br> a. True<br> b. False
    15·1 answer
  • Jim works the parts counter for a busy car dealership. When answering the phone, Jim often has trouble answering the customer's
    6·1 answer
  • Unlocking your smart phone remote security protections that protect your mobile device from meniscus applications
    5·1 answer
  • What is a society that has moved to the internet Rather than relying on physical media called
    11·1 answer
  • It's fill the gap homework
    7·1 answer
  • How do you suppose a request travels from one computer to another? How does the request know where to go?
    8·1 answer
  • 3 of 10 Taking more than four years to graduate will increase costs and may impact a return on investment. What could you check
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!