Develop an algorithm and a C program that obtains X and Y coordinates from the user and then displays a message telling the user where the point lies on the Cartesian plane:
on the x-axis, or
on the y-axis, or
in quadrant 1, or
in quadrant 2, or
in quadrant 3, or
in quadrant 4, or
at the origin.
Interaction with the user might look something like this:
This program gives you info about where a point lies on the Cartesian plane.
Please enter an integer for the X coordinate: 7
Please enter an integer for the Y coordinate: -8
The point 7 / -8 lies in Quadrant 4
Thanks for using my program.
Here are some additional requirements:
A programmer-created function (PCF) named greet() will communicate the purpose of the program to the user.
greet() shall be called from main().
A programmer-created function (PCF) named get_x() will obtain the X coordinate from the user.
get_x() shall be called from main().
A programmer-created function (PCF) named get_y() will obtain the Y coordinate from the user.
get_y() shall be called from main().
A programmer-created function (PCF) named determine_pt() will determine the location of the point on the Cartesian plane and communicate a one-character "code" back to the calling environment (you determine the scheme of the "code").
determine_pt() shall be called from main().
The decision logic to determine the location of the point shall be included as part of the comments for determine_pt().
You must use if/else if/else construction to implement your decision logic for determine_pt().
A programmer-created function (PCF) named display_result() will take the one-character "code" and display a single message to the screen that informs the user of the location of the point.
display_result() shall be called from main().
The decision logic to determine the single message that is displayed (based on your "code" scheme) shall be included as part of the comments for display_result().
You must use switch/case construction to implement your decision logic for display_result().