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 |
先搞清楚输出double和float到底有什么不同吧,假如不会用为什么不用cout?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator