Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Matlab You run a small business selling knives. You can produce only 5,000 knives in a month. You hire door-to- door salespeople, and have

Using Matlab

image text in transcribed

You run a small business selling knives. You can produce only 5,000 knives in a month. You hire door-to- door salespeople, and have created a system of pay to give the salespeople great incentives for excellent performance. In particular, the following chart shows how much each salesperson gets paid per sale, depending on how many sales he or she has made in the month: Number of Knives Sold Pay Less than or equal to 100 $5.00 $10.00 In between 101 and 200 More than 200 $15.00 If a salesperson sells 70 knives in a month, he receives 70 x $5.00 = $350.00 If a salesperson sells 120 knives in a month, he receives 100 x $5.00 + 20 x $10.00 = $700, since he receives $10.00 for each of the last 20 knives he sold. If a salesperson sells 400 knives in a month, he receives 100 x $5.00 + 100 x $10.00 + 200 x $15.00 = $4500.00 for the month. Create a Script File that will calculate how much the sales person gets paid for the month. Use a Script file that asks the salesperson how many knives they sold for the month and prints out how much he gets paid for the month. Input Specification The number of knives a salesperson sells in a month. Output Specification Output the salesperson's pay for the month in the following format: You sold (number of knives), and made $X.XX selling knives this month. Test your program for all possible inputs; negative numbers and very large numbers included

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

What is computer neworking ?

Answered: 1 week ago