解题思路:
注意事项:
参考代码:
#include<bits/stdc++.h>
#define pi 3.1415
using namespace std;
int L, W,x, y, R,a, v, s;
double resX, resY;
int main()
{
while (cin >> L >> W >> x >> y >> R >> a >> v >> s) {
if (!L)
break;
L -= 2 * R;
W -= 2 * R;
x -= R;
y -= R;
double arc = a * acos(-1) / 180;
double length = fabs(x + v * s * cos(arc));
double width = fabs(y + v * s * sin(arc));
while (length > 2 * L )
length -= 2 * L;
while (width > 2 * W)
width -= 2 * W;
if (length <= L) {
resX = length + R;
} else {
resX = 2 * L - length + R;
}
if (width <= W) {
resY = width + R;
} else {
resY = 2 * W - width + R;
}
cout << fixed << setprecision(2) << resX << " " << resY << endl;
}
return 0;
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题6.10 (C语言代码)浏览:582 |
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:613 |
WU-图形输出 (C++代码)浏览:826 |
C语言程序设计教程(第三版)课后习题8.4 (C语言代码)浏览:620 |
C语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:385 |
1011题解浏览:810 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:432 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:1490 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:491 |
小O的数字 (C语言代码)浏览:1478 |