| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
高手们帮忙看一下吧,为什么通不过呢?#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
void main () {
unsigned int a, b, s, m, n;
float angle, speed;
for(;;) {
cin >> a >> b >> s >> m >> n;
if(a == 0 && b == 0 && s == 0 && m == 0 && n == 0)
break;
angle = atan((float)(b * n)/(float)(a * m)) * 180 / 3.1415926;
speed = sqrt((float)(b * n) * (float)(b * n) + (float)(a * m) * (float)(a * m))/ s;
cout << setiosflags(ios::fixed);
cout << setprecision(2) << angle << " " << speed << endl;
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator