我的问题是如何从公斤转换为磅和盎司?
我知道 1kg=1000gm 和 2 lb 3.274 oz (1 lb = 16 oz)
我将阅读包含以下内容的文件:
A 重量 3000 gm,B 重量 90 kg
所以 3000 公斤的结果将是188 磅和 1.6 盎司。
static void ToLB(double Weight, string type)
{
double Weightgram, kgtopounds;
// lbs / 2.2 = kilograms
// kg x 2.2 = pounds
if (type == "g")
{
// convert gram to kg
Weightgram = Weight * 1000;
// then convert kg to lb
kgtopounds = 2.204627 * Weight;
//convert gram to oz"
Weightgram = Weightgram * 0.035274;
Console.Write("\n");
Console.Write(kgtopounds);
}
// I want to convert each gram and kg to pounds and oz using C#