URI Online Judge Solution | 1041 Coordinates of a Point

Here is the logic,  1041

If x!=0 and y==0 then it will be in the y asix and
If y!=0 and x==0 then it will be in the x axis

that means you have to understand if what the value is equivalent to 0 then it will be in that axis

And one thing = means assignment operator if x=y then if x=5 then y=5

and == means comparison operator if x==y then if x==4 and y==5 then x!=y so it will be false

and if x=5 and y=5 then x==y and it is true



and like this can do



Here in this code you have to think about the flow which normally starts from the 0 and the compiler starts punctuating the code from Zero 0.

logic flow can be start from 0 then can be happen through greater than or equal

It’s better to do in C/C++ main format