Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB code An oil company bores a hole that is n meters deep. Taking the value n from the user, write the code that calculates

MATLAB code
An oil company bores a hole that is n meters deep. Taking the value n from the user, write the code that calculates the cost of boring, if the total cost is calculated in the following manner:
$30.00 for drilling the first meter plus $2.00 per meter for each succeeding meter.
Write a script to solve the above problem. Calculate the cost only if the entered depth is at least 1m. Display both the depth and the cost in the user friendly format as shown below for an example of 5 meters.
Example for the depth of 5 : Depth: 5m, Cost =$38
Copy the statements in your script into the answer box for this question.
image text in transcribed

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

Step: 3

blur-text-image

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

How many database records is the system expected to support?

Answered: 1 week ago

Question

Define Decision making

Answered: 1 week ago

Question

What are the major social responsibilities of business managers ?

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago

Question

List at least three disadvantages to using a consultant.

Answered: 1 week ago

Question

How are arbitrators credentialed?

Answered: 1 week ago