Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C code (Not C++) Problem 2 . Create a script that will take 4 vertices (Keep in mind each vertex require 2 numbers for both

image text in transcribed

C code (Not C++)

Problem 2 . Create a script that will take 4 vertices (Keep in mind each vertex require 2 numbers for both horizontal and vertical coordinates. So Total 8 numbers of user input!) and make the decision whether the 4 vertices form a square, a rectangular (but not a square), a diamond shape, a parallelogram (but not rectangular). Do not have to ask the user whether she/he wants to repeat the whole process. Square: All angles are equal. All sides are equal. The area of Square One side Diamond: All sides are equal. The area of Diamond Product of Diagonal lines x 0.5. Rectangular: All angles are equal and altemate sides are equal. The area is the product of a pair of altermate sides. Parallelogram: Two pair of parallel sides. Please, use these coordinates to verify your script. Vertex 1 = [0,1], Vertex 2 = [0,0], Vertex 3 = [1,0], Vertex 4 = [1,1]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions