CJCoding With Joseph
15free / daySign inCreate account

Quadrant Of A Point

Read the x and then the y coordinate of a point and print which quadrant it is in: both positive is Quadrant 1, x negative and y positive is Quadrant 2, both negative is Quadrant 3, x positive and y negative is Quadrant 4, and a point with either coordinate equal to zero prints On an axis. Input: two lines, each an integer, no prompts. Output: one line. Each branch combines two comparisons with and.

Expected Output:

Quadrant 1

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
If StatementsOperators
📥 Auto-Input:
3\n4\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.