Explore
ProGrad Programs
Placement Prep
TCS Codevita
Live Placement Training
Webinars
About Us

Edit
Reply




Edit

Program to find the quadrant in which the given coordinates lie | FACE Prep

Published on 10 Mar 2020

Program to find the quadrant in which the given coordinates lie is discussed here. Input a point from the user and find the quadrant in which the given coordinates lie.


DESCRIPTION


If it is in 1st Quadrant, then display Ist Quadrant,

if it is in 2nd Quadrant, then display IInd Quadrant,

if it is in 3rd Quadrant, then display IIIrd Quadrant,

if it is in 4th Quadrant, then display IVth Quadrant and

if it is in center display Origin


INPUT FORMAT:

  • Input consist of 2 integers.
  • First input corresponds to x co-ordinate.
  • Second input corresponds to y co-ordinate.


SAMPLE INPUT AND OUTPUT:


Input:

5

6


Output:

Ist Quadrant


Program to find the quadrant in which the given coordinates lie


C
C++
Java
Python 3

Output
-2
-3
IIIrd Quadrant


Recommended Programs






If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in