※ 引述 《sustainer123 (caster)》 之铭言:
:
: 我要input
: (-2.5,0),(0.5,4),(4.5,1),(1.5,-3)
: (3,-2),(-3,-2),(-3,2),(3,2)
:
: 我写
: double x1, y1, x2, y2, x3, y3 x4, y4, x5, y5, x6, y6, x7, y7, x8, y8;
:
: scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y
4)
: ;
: scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x5, &y5, &x6, &y6, &x7,&y7,&
x8
: , &y8
: );
:
: 跑出来的结果是0
:
: 为什么输入不进去R?
:
: 直接输入数字没问题 复制()就GG
本来在想循环怎么写
后来想不到
之后改成这样就过了
double x1, y1, x2, y2, x3, y3, x4 ,y4;
scanf("(""%lf"", ""%lf"")" ", ""(""%lf"", ""%lf"")" ", ""(""%lf"", ""%lf"")"
", ""(""%lf"", ""%lf"")" , &x1, &y1, &x2, &y2 , &x3, &y3, &x4, &y4);
double x5, y5, x6, y6, x7, y7, x8, y8;
scanf(" (""%lf"", ""%lf"")" ", ""(""%lf"", ""%lf"")" ", ""(""%lf"", ""%lf""
)" ", ""(""%lf"", ""%lf"")" , &x5, &y5 , &x6, &y6, &x7, &y7, &x8, &y8);
完全不懂原理==