with the values 3 5 3 1
the test
if(xp1!=xp2 && yp1!=yp2){
is false because xp1 and xp2 value 5, so you do nothing
And as I said in a remark
if(x1<=1000000 && x1>0 && x2<=1000000 && x2>0 && y1<=1000000 && y1>0 &&
y1<=1000000 && y1>0){
must be
if(x1<=1000000 && x1>0 && x2<=1000000 && x2>0 && y1<=1000000 && y1>0 &&
y2<=1000000 && y2>0){`
2
solved IF statement doesn’t go through [closed]