Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab Please with comments 8. Th e Eco-Marathon is an annual competition sponsored by Shell Oil, in which participants build special vehicles to achieve the

Matlab
Please with comments image text in transcribed
8. Th e Eco-Marathon is an annual competition sponsored by Shell Oil, in which participants build special vehicles to achieve the highest possible fuel efficiency. The EEco-Marathon is held around the world with events in the United Kingdom, Finland, France, Holland, Japan, and the United States. A world record was set in the Eco-Marathon by a French team in 2003 called Microjoule with a performance of 10,705 miles per gallon. The Microjoule runs on ethanol. Write a MATLAB program to determine how far the Microjoule will travel in kilometers given a user-specified amount of ethanol, provided in units of grams. Your program should ask for the mass using an input statement and display the distance in a formatted sentence similar to the output that follows. If the user provides a mass less than zero or greater than 500 grams, your program should terminate after displaying an error message using the error function indicating that the provided mass of ethanol is outside of the desired range of input. Sample Input/Output (three examples) Enter mass of ethanol Igrams]: -15 Error: Mass must be between 0 and 500 grams Enter mass of ethanol Igrams]: 1000 Error: Mass must be between 0 and 500 grams Enter mass of ethanol Igrams ]: 100 The distance the Microjoule traveled is 577 kilometers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

Students also viewed these Databases questions

Question

How do we organise for international logistics?

Answered: 1 week ago

Question

What are the logistics implications of internationalisation?

Answered: 1 week ago