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啊

Posted by 200830740509 at 2009-08-08 18:39:13 on Problem 1045
#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:
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