Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Want the answers in MatLab codes script 1.The area A of a rhombus is defined as A-d1d2/2 and the perimeter P of rhombus is 2
Want the answers in MatLab codes script
1.The area A of a rhombus is defined as A-d1d2/2 and the perimeter P of rhombus is 2 defined as P-4.11 +1-2 | , where d!and d2 are the lengths ofthe two diagonals in inches a. Write a function rhombus that accepts dl and d2 as inputs and return the area and the perimeter of the rhombus. Write a script that first prompts the user for the lengths of the two diagonals. If either is a negative number of zero, the prints an error message. Otherwise, if they are both positive, it calls a function rhombus ( in a) to return the area and the perimeter of the rhombus, and then print the result with 1 decimal places. bStep 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