| ||||||||||
| 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 <stdlib.h>
#include <string.h>
#include <fstream>
#include <math.h>
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
double s,pi=3.14159265;
while(scanf("%lf",&s)!=EOF)
{
double r=sqrt(s/pi)/2;
double h=sqrt(s*2/pi);
double V=sqrt(s*s*s/(2*pi))/6;
printf("%.2f\n",V);
printf("%.2f\n",h);
printf("%.2f\n",r);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator