← Back to If Statements
Question 231
Quadrant Finder
Quadrant Finder
Two numbers x and y are the coordinates of a point. PrintQuadrant 1when both are positive,Quadrant 2when x is negative and y positive,Quadrant 3when both are negative,Quadrant 4when x is positive and y negative, andOn an axiswhen 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
Sign in to use hintsTopics:
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.