#include<iomanip>
using namespace std;
int main()
{
int height,weight,age,n;
double hat,clothes,pants;
hat = 0;
clothes = 0;
pants = 0;
n = 0;
while (n == 0)
{
cin >> height >> weight >> age;
hat = (1.0 * weight) / height * 41.2;
clothes = height * weight / 634.4;
pants = weight * 0.4;
if (age >= 28)
{
pants += ((age - 28) / 2) * 0.25;
if (age >= 30)
{
clothes += ((age - 30) / 5) * 0.15;
}
}
cout << fixed << setprecision(2) << hat << " " << clothes << " " << pants << endl;
cin >> n;
}
return 0;
}
沒有留言:
張貼留言