※ 引述 《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);
完全不懂原理==