HDU 2529 Shot (物理数学题)

题目

解题过程:

//物理数学题
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;

int main()
{
    double h,l,v,ans;
    while(scanf("%lf%lf%lf",&h,&l,&v)!=EOF)
    {
        if(h==0&&l==0&&v==0)break;
        ans = h + v * v / 19.6 - 4.9 * l * l / v / v;
        printf("%.2lf
",ans);
    }
    return 0;
}
View Code
一道又一道,好高兴!
原文地址:https://www.cnblogs.com/laiba2004/p/3804197.html