Create a structure called Point that contains variables x and y. Then instantiate a Point object named point1 and ask for a user input to assign values for x and y. Given a point, draw a quadrilateral using with each character acting as one unit. The dimensions of the quadrilateral depends on the distance of the Point from the origin. Compute and display the quadrilateral's perimeter and area. If the point is not feasible for a quadrilateral (e.g. when the Point is on the axis), print "Cannot form a quadrilaterall". Input 1. One line containing an integer for variable X. 2. One line containing an integer for variable Y. Output Enter X: 4 Enter Y: 4 Perimeter: 16 Area: 16
Create a structure called Point that contains variables x and y. Then instantiate a Point object named point1 and ask for a user input to assign values for x and y. Given a point, draw a quadrilateral using with each character acting as one unit. The dimensions of the quadrilateral depends on the distance of the Point from the origin. Compute and display the quadrilateral's perimeter and area. If the point is not feasible for a quadrilateral (e.g. when the Point is on the axis), print "Cannot form a quadrilaterall". Input 1. One line containing an integer for variable X. 2. One line containing an integer for variable Y. Output Enter X: 4 Enter Y: 4 Perimeter: 16 Area: 16
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section: Chapter Questions
Problem 3PP
Related questions
Question
Solve Structure in C Program
See Photo below for more details
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr