Question: Matlab Question The area A of a rectangle is defined as A=lw, where L and w are the length and width of the rectangle. Write
Matlab Question
The area A of a rectangle is defined as A=lw, where L and w are the length and width of the rectangle. Write a script called area that first prompts the user for the length and width of the rectangle. If either is a negative number or zero, the script prints an error message. Otherwise, if they are both positive, it calls a function rectanglearea to return the area of the rectangle, and prints the result. Write the function, also! The length and width of the rectangle are passed to the rectanglearea function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
