#include <stdio.h>
float kg2lb(float kilo)
{
float pound;
pound = 2.2046 * kilo;
return pound;
}
int main()
{
float weight_kg;
float weight_ponud = 100;
weight_ponud = kg2lb(weight_kg);
printf("%.2f",weight_kg);
return 0;
}
(这个肯定是不行的)
如何通过 100 磅得到千克数(不修改函数的情况下)?