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

为什么我的程序不对?wa

Posted by yaya at 2005-10-04 17:40:05 on Problem 2463
In Reply To:ACM就是面向大学生的啊,这个不会怎么混 Posted by:sunmoonstar_love at 2005-07-06 14:36:46
#include<iostream>
using namespace std;
double k,l,h,w;
int main()
{
cin>>k>>l>>h>>w;
while(k&&l&&h&&w)
{
double a=w*10*5;
double b=w*9.81*h;
double c=(h-l)*(h-l)*k/2;
if(((a+c)<b)||(l>=h))
cout<<"Killed by the impact."<<endl;
else if((b>=c))
{
cout<<"James Bond survives."<<endl;
}
else
cout<<"Stuck in the air."<<endl;
cin>>k>>l>>h>>w;
}
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