Code: Select all
if(Y==0)printf("POINT %.2f 0.00\n",X);
else if(X==0) printf("POINT 0.00 %.2f\n",-Y);
else printf("POINT %.2f %.2f\n",X,-Y)
Code: Select all
if(X==0)printf("POINT 0.00");
else printf("POINT %.2f",X);
if(Y==0) printf(" 0.00\n");
else printf(" %.2f\n",-Y);
I did this because sometimes i was printing "-0.00" instead of "0.00"