Write a program that takes the x-y coordinates of a point in the Cartesian plane and prints a message telling either an axis on which the point lies, or the quadrant in which it is found, or the origin.

Sample lines of output for 4 runs.

Enter X and Y separated by a space: -1.0 -2.5

The point (-1.0, -2,5) is in quadrant III

Enter X and Y separated by a space: 0.0 -4.8

The point (0.0, 4.8) is on the y axis

Enter X and Y seperated by a space: 0.0 0.0

The point (0.0, 0.0) is the origin

Enter X and Y seperated by a space: 5.2 0.0

The point (5.2, 0.0) is on the x axis

Code:

| | QII | QI | | ------------------- | | QIII | QIV | |

**Run #1**Enter X and Y separated by a space: -1.0 -2.5

The point (-1.0, -2,5) is in quadrant III

**Run #2**Enter X and Y separated by a space: 0.0 -4.8

The point (0.0, 4.8) is on the y axis

**Run #3**Enter X and Y seperated by a space: 0.0 0.0

The point (0.0, 0.0) is the origin

**Run #4**Enter X and Y seperated by a space: 5.2 0.0

The point (5.2, 0.0) is on the x axis

*Last edited by shabbir; 15Jul2009 at 09:47.. Reason: Code blocks*