CJCoding With Joseph
15free / daySign inCreate account

Quadrant Finder

Two numbers x and y are the coordinates of a point. Print Quadrant 1 when both are positive, Quadrant 2 when x is negative and y positive, Quadrant 3 when both are negative, Quadrant 4 when x is positive and y negative, and On an axis when either coordinate is 0. Use && inside an if / else if chain and || for the axis test.

Expected Output:

Quadrant 2

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

Hints4 available
Topics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.