Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedWant 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. b

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

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago

Question

Prepare and properly label figures and tables for written reports.

Answered: 1 week ago