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 |
为什么我的程序不对?waIn 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator