Canadian Computing Competition: 2017 Stage 1, Junior #1
A common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from
For example, the point
Your job is to take a point and determine the quadrant it is in. You can assume that neither of the two coordinates will be
Input Specification
The first line of input contains the integer
Output Specification
Output the quadrant number (
Sample Input 1
Copy
12
5
Sample Output 1
Copy
1
Sample Input 2
Copy
9
-13
Sample Output 2
Copy
4
Comments
This comment is hidden due to too much negative feedback. Show it anyway.
no math required
Just set the x and y to if it was negative or positive and it should be smooth sailing from there!
This comment is hidden due to too much negative feedback. Show it anyway.
Read the editorial if you need help.
This comment is hidden due to too much negative feedback. Show it anyway.