URI 1041 Coordinates of a Point SOLVED in Java
Hello, i found this code little bit hard to understand but solved it, and i think this might be also hard to understand to some of the beginners who is solving problems, So here is how i solved it :
Problem Link : URI 1041
We are going to write an algorithm that reads two floating values (x and y), which should represent the coordinates of a point in a plane. Next, we are gonna determine which quadrant the point belongs, or if we are over one of the Cartesian axes or the origin (x = y = 0).
If the point is at the origin, write the message "Origem".
If the point is over X axis write "Eixo X", else if the point is over Y axis write "Eixo Y".
The input contains the coordinates of a point.
Sample input :
The output should display the quadrant in which the point is.
Sample output :
Hope this will help you <3.