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

Re:c怎么结束输入啊,Output Limit Exceeded

Posted by l2011012181 at 2013-07-19 17:01:07 on Problem 2508
In Reply To:c怎么结束输入啊,Output Limit Exceeded Posted by:l2011012181 at 2013-07-18 16:12:35
> #include <stdio.h>
> #include<math.h> 
> 
> #define pi 3.1415926
> 
> int main()
> {
> 	float r,h,d1,A1,d2,A2,d,A;
> 	while(scanf("%f%f%f%f%f%f",&r,&h,&d1,&A1,&d2,&A2))
> 	{
> 		A = A2 - A1;
> 		if(A < 0)
> 			A = -A;
> 		d = sqrt(d1 * d1 + d2 * d2 - 2 * d1 * d2 * cos(A * r / sqrt(r * r + h * h) * pi / 180));
> 		printf("%.2f\n",d);
> 	}
> 	return 0;
> }

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