Question: Q1. Write a function called get_point(x,y) that asks to input x and y doubles coordination of a point from the keyboard and returns their

Q1. Write a function called get_point(x,y) that asks to input x and 

Q1. Write a function called get_point(x,y) that asks to input x and y doubles coordination of a point from the keyboard and returns their values. Q2. Write a function called quadrants(x,y) that determine and display to the screen in which quadrant is the point. The function should also return one value based on the point position. return 0 for origin (0,0), return 1 for point in first quadrant (positive, positive) return 2 for point in second quadrant (negative, positive) return 3 for point in third quadrant (negative, negative) return 4 for point in fourth quadrant (positive, negative) return 5 for point on x axis return 6 for point on y axis Q3. Write a function called slope that takes x and y coordination of two points as inputs and return the slope of the line that connect them. Check if the slope of line is undefine then print out an error message and return 999. Note: slope of a line = - X2-X1 Q4. Illustrate these functions from the main function by (See sample outputs below) a. getting the coordination of three points (x1, y), (X2, y2), (X3, Y3). b. determining in which quadrant each point lies. c. finding the slope of the line connecting first and second point and display it to screen. d. Also determine and display to the screen if the third point lies on the same line that connect the first and second point.

Step by Step Solution

3.47 Rating (173 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 include using namespace std void getpointint x int y Prompt for x and y cout xy int main xy variab... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!