Program to determine the quadrant of the cartesian plane | Function to check quadrant ; Driver code ; Function call
< ? php function quadrant ( $ x , $ y ) { if ( $ x > 0 and $ y > 0 ) echo ( " lies ▁ in ▁ First ▁ quadrant " ) ; else if ( $ x < 0 and $ y > 0 ) echo ( " lies ▁ in ▁ Second ▁ quadrant " ) ; else if ( $ x < 0 and $ y < 0 ) echo ( " lies ▁ in ▁ Third ▁ quadrant " ) ; else if ( $ x > 0 and $ y < 0 ) echo ( " lies ▁ in ▁ Fourth ▁ quadrant " ) ; else if ( $ x == 0 and $ y > 0 ) echo ( " lies ▁ at ▁ positive ▁ y ▁ axis " ) ; else if ( $ x == 0 and $ y < 0 ) echo ( " lies ▁ at ▁ negative ▁ y ▁ axis " ) ; else if ( $ y == 0 and $ x < 0 ) echo ( " lies ▁ at ▁ negative ▁ x ▁ axis " ) ; else if ( $ y == 0 and $ x > 0 ) echo ( " lies ▁ at ▁ positive ▁ x ▁ axis " ) ; else echo ( " lies ▁ at ▁ origin " ) ; } $ x = 1 ; $ y = 1 ; quadrant ( $ x , $ y ) ; ? >