Write a MATLAB program to prompt the user to enter a value o
Solution
clear
A = input(\'Enter x-coordinate: \');
B = Input(\'Enter y-coordinate: \');
If A==0
\'The point is on Y-Axis\'
 % if the abscissae value is 0, the number lies on the y-axis
Else
                 If B==0
 % if the ordinate value is 0, the number lies on the x-axis
\'The point is on X-axis\'
Else
                                 If A>0 & B>0
 % If both the x-coordinate (abscissae) and y-coordinate(ordinate) both are positive , it lies in the first quadrant as first quadrant encompasses all the +ve x and y-coordinate values.
\'The number lies in 1st Quadrant\'
Else
                                                 If A<0 & B>0
 % If the x-coordinate (abscissae) is negative and y-coordinate(ordinate) is positive , it lies in the second quadrant as second quadrant encompasses all the - ve x and +ve y-coordinate values.
\'The number lies in 2nd Quadrant\'
Else
                                                                 If A<0 & B<0
 % If both the x-coordinate (abscissae) and y-coordinate(ordinate) both are negative , it lies in third quadrant as third quadrant encompasses all the –ve x and y-coordinate values.
\'The number lies in 3rd Quadrant\'
Else
                                                                                 If A>0 & B<0
 % If the x-coordinate (abscissae) is positive and y-coordinate(ordinate) is negative , it lies in the fourth quadrant as fourth quadrant encompasses all the + ve x and -ve y-coordinate values.
\'The number lies in 4th Quadrant\'
Else
\'The number is on Origin\'
% if both x and y coordinates have value of 0.
End
End
End
End
End
End


