Question: Write a program that tells the user which quadrant a pair of variables is in if the variables x and y are to be plotted

Write a program that tells the user which quadrant a pair of variables is in if the variables x and y are to be plotted on a y versus x graph using cascaded if-else statements. The 9 different conditions that you need to test for are:
Quadrant 1
Quadrant 2
Quadrant 3
Quadrant 4
Positive x Axis
Positive y Axis
Negative x Axis
Negative y Axis
Origin
Specifications:
Use Netbeans to create a HW05 project, and a main.cpp file using C++.
Include a prompt that asks a user to input a coordinate pair before you scan in the values from the keyboard, such as "Input Coordinate Pair:" (you must include a colon in your prompt). The program should then read in the values and determine where the point is located on the xy graph. Please note that the first number is associated with x, and the second with y.
The output should print one of the 9 string values listed above to the screen. If you execute the program with the following underlined inputs, the output will be:
Input Coordinate Pair: 0.0,5.3?
Positive y Axis
For the above input (0.05.3), your program should display this exactly.
 Write a program that tells the user which quadrant a pair

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!