UVA 10387(夏休み-ジオメトリ-C-Billiard)
463 ワード
#include <cstdio>
#include <cmath>
using namespace std;
int main() {
double a, b, s, m, n;
while (scanf("%lf%lf%lf%lf%lf", &a, &b, &s, &m, &n) && (a || b || s || m || n)) {
double side = sqrt((a*m)*(a*m) + (b*n)*(b*n));
double velocity = side / s;
double angle = acos( a*m / side ) * 180/3.1415926;
printf("%.2lf %.2lf
", angle, velocity);
}
return 0;
}