Question: Function Name: Scrapwood() Inputs: 1. ( double ) The amount of inches of wood you want to cut off Outputs: 1. ( double ) The

Function Name: Scrapwood()

Inputs:

1. ( double ) The amount of inches of wood you want to cut off

Outputs:

1. ( double ) The amount of feet of wood that will be left

2. ( double) The amount of inches of wood that will be left

Topics: ( mod ), ( functions )

Background:

George needs to cut wood for his robot. He knows how much wood

he wants to cut-off but also wants to know how much wood will be left.

Function Description:

Given the amount of inches of wood to cut off, calculate the amount of wood that will be

left in feet (first output) and inches (second output). Assume that you will always start with 10

feet of wood. Notice that there are 12 inches in a foot.

Example:

inchesToCut = 88;

[feetLeft, inchesLeft] = Scrapwood(inchesToCut)

feetLeft 2

inchesLeft 8

Notes:

All inputs will be positive integers less than or equal to 120 inches

Your second output must be less than 12 inches.

Please Solve using MATLAB. TO RECEIVE THUMBS UP PLEASE DO NOT USE CONDITIONAL STATEMENTS OR ITERATIONS!!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!