Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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: 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 plot. Please note that the Grader Program will submit data to your program by entering two numbers that are separated by a space. The first number is associated with x, and the second with y. The output should return one of the 9 string values listed above (exactly!) to the screen. When you print the results, do not print out anything other than one of the 9 phrases or words listed above. Please note that the Grader Program is case sensitive. If you execute if you execute the program with the following underlined inputs, the output will be: -> main.o Input Coordinate Pair: 0.0 5.3 Positive y Axis For the above input (0.0 5.3), your program should display this exactly. If your program does not follow these specifications properly, the Grader Program will not accept your submission

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

What was the positive value of Max Weber's model of "bureaucracy?"

Answered: 1 week ago

Question

You have

Answered: 1 week ago