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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started