This problem can be solved by using if else statement only.
Look carefully, there are some conditions to determine the quadrant.
For example, when both the elements are positive it is at 1st quadrant.
2. When a<0 and b>0 it’s in 2nd quadrant and so on.
Hope you got it.