标签:return div main style code ble col can else
#include<stdio.h> int main() { double a,b,c,d,e,f,g,h,i; while(~scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)) { double x,y,x1,y1,k1,k2,b1,x2,y2,x3,y3; x=a; y=b; x1=a+c; y1=b+d; if(x1==x) { if(e>x)x2=x-(e-x); else x2=x+(x-e); y2=f; } else { k1=(y1-y)*1.0/(x1-x); b1=y-k1*x*1.0; g=k1; h=-1; i=b1; x2=(h*h*e-g*g*e-2*g*h*f-2*g*i)*1.0/(g*g+h*h); y2=(g*g*f-h*h*f-2*g*h*e-2*h*i)*1.0/(g*g+h*h); } if(x2>0)x3=(int)(x2*100.0+0.5); else x3=(int)(x2*100.0-0.5); if(y2>0)y3=(int)(y2*100.0+0.5); else y3=(int)(y2*100.0-0.5); printf("%.2f %.2f\n",x3/100.0,y3/100.0); } return 0; }
标签:return div main style code ble col can else
原文地址:https://www.cnblogs.com/zzjam--1/p/11403145.html