| ||||||||||
| 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啊#include <cstdio>
#include <algorithm>
#include <functional>
#include<cstdlib>
#include<iostream>
#include<cstring>
#include<cmath>
using namespace std;
int main()
{
float vs,r,c,w,vr;
int n,i;
scanf("%f %f %f %d",&vs,&r,&c,&n);
for(int i=1;i<=n;i++)
{
scanf("%f",&w);
vr=c*r*w*vs/sqrt(1+c*r*w*c*r*w);
printf("%.3f\n",vr);
}
system("pause");
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator