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

先搞清楚输出double和float到底有什么不同吧,假如不会用为什么不用cout?

Posted by frkstyc at 2005-04-03 02:33:23 on Problem 1799
In Reply To:请教牛人帮忙 Posted by:cpp050700448084 at 2005-04-03 01:10:37
先熟悉了语言再做题

> #include <iostream.h>
> #include<math.h>
> #include<stdio.h>
> double pi=3.141592;
> void main()
> {
> 	int t;cin>>t;
> 	double R;int n;
> 	for (int i=1;i<=t;i++){
> 		cin>>R>>n;
> 		cout<<"Scenario #"<<i<<":"<<endl;
> 		printf("%.3f\n\n",( R * sin ( pi / n ) ) / ( 1 + sin ( pi / n ) ) );
> 	}
> }

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