Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

高手们帮忙看一下吧,为什么通不过呢?

Posted by cpp0600548024 at 2006-02-26 09:05:56 on Problem 2641
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator