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
icon
Related questions
Question
Solve Structure in C Program See Photo below for more details
1. Structures Quiz
by CodeChum Admin
← Back to Previous Page
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
main.c
Transcribed Image Text:1. Structures Quiz by CodeChum Admin ← Back to Previous Page 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 main.c
Test Cases
CE Run Tests
Constraints
Executions
O Constraint 1
This code must use the instance's field/s.
Test Cases
O Test Case 1
Your Output
No Output
Expected Output
Enter X: 4
Enter Y: 4
Perimeter: 16
Area: 16
O Test Case 2 Hidden
*
Transcribed Image Text:Test Cases CE Run Tests Constraints Executions O Constraint 1 This code must use the instance's field/s. Test Cases O Test Case 1 Your Output No Output Expected Output Enter X: 4 Enter Y: 4 Perimeter: 16 Area: 16 O Test Case 2 Hidden *
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
User Defined DataType
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr