roberthsu2003 / __2024_07_29_1_3_night__

2024_07_29_1_3_巨匠AI
20 stars 3 forks source link

請計算BMI值 #1

Open roberthsu2003 opened 1 month ago

roberthsu2003 commented 1 month ago

輸入:

  1. 請輸入姓名:
  2. 請輸入身高(cm):
  3. 請輸體重(kg)

輸出:

xxx您好: 您的BMI值是:23.45

截圖 2024-08-05 晚上9 54 18
roberthsu2003 commented 1 month ago
kg_taiwan = float(input('請輸入台斤:'))
kg = kg_taiwan * 0.6
#print(str(kg_taiwan) + "台斤=" + str(kg) + "公斤")
print(f'{kg_taiwan}台斤={kg}公斤') #字串插補
hellno3009 commented 1 month ago
H = float(input("輸入身高(cm)"))
kg = float(input("輸入體重(kg)"))
BMI = kg / ((H*0.01)**2)
print(f"你的BMI是{round(BMI,2)}")
xinyi20057 commented 1 month ago
a=float(input("name"))
b=float(input("身高(cm)"))
c=float(input("體重(kg)"))
d=c/((0.01b)(0.01*b))
print(f"{a}您好,您的BMI值是{d}。")
yinggg32 commented 1 month ago
name = input("請輸入姓名:")
kg = float(input("請輸入體重(kg):"))
cm = float(input("請輸入身高(cm):"))
m = float(cm / 100)
bmi = kg/ m**2
print(f'{name}您好:')
print(f'您的BMI值是:{bmi}')
grace588 commented 1 month ago
name = input("請輸入姓名:")
kg = float(input("請輸入體重(kg):"))
cm = float(input("請輸入身高(cm):"))
m = float(cm / 100)
bmi = kg/ m**2
print(f'{name}您好:')
print(f'您的BMI值是:{bmi}')
Jonas-0819 commented 1 month ago
name=input("請輸入姓名")
height=float(input('請輸入身高'))
weight=float(input('請輸入體重'))
bmi=weight/(((height*0.01))**2)
print(f"{name}的bmi為{bmi}")
houpaul commented 1 month ago
print("你的體重"float(input(輸入體重(kg)"))/hight = float(input("輸入身高(cm)")*0.01))
FriendlyLu commented 1 month ago
name = input("請輸入姓名: ")
height = float(input("請輸入身高:"))
weight = float(input("請輸入體重:"))

print(f"{name}您好:")
print(f"您的 BMI 值為: {round(weight / (height*0.01)**2, 2)}")
72032c commented 1 month ago
name=input("請輸入姓名:")
cm=float(input("請輸入身高(cm):"))
kg=float(input("請輸入體重(kg):"))
m=cm/100
bmi=round(kg/m**2,2)
print(f'{name}您好:')
print(f'您的BMI值是:{bmi}')
vin-55 commented 1 month ago
H = float(input("輸入身高(cm)"))
kg = float(input("輸入體重(kg)"))
BMI = kg / ((H*0.01)**2)
print(f"你的BMI是{round(BMI,2)}")
Oscar-Lee-20211298 commented 1 month ago
name =(input("name:"))
kg = float(input("weight:"))
m = float(input("height:"))
bmi = kg/ m**2
print(f'{name}hellp:')
print(f'your BMI is:{bmi}')
loseralex0701 commented 1 month ago
name = str(input("請輸入姓名"))
kg = float(input('請輸入體重:'))
cm = float(input('請輸入身高:'))
bmiresult = float(kg / (cm *0.01* cm*0.01))
print (f'您的BMI值是{bmiresult}')
patrick11330619 commented 1 month ago
name=str(input('請輸入姓名'))
high=float(input('請輸入身高(m)'))
weight=float(input('請輸入體重(kg)'))
BMI=round(weight/(high**(2)),ndigits=2)
print(f'{name}你好:')
print(f'您的BMI值是:{BMI}')
gloria8395 commented 1 month ago
name=input('請輸入姓名:')
h=float(input('請輸入身高(cm):'))
w=float(input('請輸入體重(kg):'))
bmi=w/(h/100)**2
print(name+f'您好:\n您的BMI值是:{bmi}')
Kevin18721 commented 1 month ago
name = input("請輸入姓名:")
hight = float(input("請輸入身高(cm):")) * 0.01
weight = float(input("請輸入體重(kg):"))

BMI = weight / (hight ** 2)
BMI = round(BMI, 1)

print(name + "您好:")
print("您的BMI值是:" + str(BMI))
Dennis10181024 commented 1 month ago
name = input('請輸入姓名:')
height_cm = float(input('請輸入身高(cm):'))
weight = float(input('請輸體重(kg):'))
height_m = height_cm *0.01
ans = round(weight / height_m**2, 2)
print(f'{name}您好:')
print(f'您的BMI值是:{ans}')
yawenny commented 1 month ago
name = input("請輸入姓名:")
height = float(input("請輸入身高(cm):"))
weight = float(input("請輸入體重(kg):"))
BMI = round(weight/(height/100)**2,ndigits=2)
print(f'{name}您好:')
print(f'您的BMI值是:{BMI}')
circleyoyo commented 1 month ago
name = input('請輸入姓名:')
height = 0.01 * float(input('請輸入身高(cm):'))
weight = float(input('請輸入體重(kg):'))
BMI = round(weight / height**2, ndigits=2)

print(f'{name}您好')
print(f'您的BMI值是{BMI}')
kxyzqo commented 1 month ago
name = input("請輸入姓名:")
height_cm = float(input("請輸入身高(cm):"))
weight = float(input("請輸入體重(kg):"))
height_m = height_cm / 100
bmi = round(weight / (height_m ** 2), ndigits=2)
print(f"{name}您好:")
print(f"您的BMI值是:{bmi}")
Imbradley1213 commented 1 month ago
name=str(input("請輸入姓名:"))
height=float(input("請輸入身高(cm):"))
weight=float(input("請輸入體重(kg):"))
height_m=height*0.01
BMI=round(weight/height_m**2,ndigits=2)
print(f"{name}您好:")
print(f"您的BMI值是:{BMI}")
patrick11330619 commented 1 month ago
 name=str(input('請輸入姓名'))
high=float(input('請輸入身高(cm)'))
highb=high*100
weight=float(input('請輸入體重(kg)'))
BMI=round(weight/(highb**(2)),ndigits=2)
print(f'{name}你好:')
print(f'您的BMI值是:{BMI}')
aa854268 commented 1 month ago
name=str(input("請輸入姓名:"))
height=float(input("請輸入身高(cm):"))
weight=float(input("請輸入體重(kg):"))
height_m=height*0.01
BMI=round(weight/height_m**2,ndigits=2)
print(f"{name}您好:")
print(f"您的BMI值是:{BMI}")
WayneChou-bot commented 1 month ago
N = str(input("請輸入姓名:"))
H = float(input("身高(cm):"))
W = float(input("體重(kg):"))
BMI = round(W / (H/100)**2, ndigits=2)
print(f'{N}您好: 您的BMI值是:{BMI}')
yuyichien1974 commented 1 month ago
name = input("請輸入姓名: ")
height_cm = float(input("請輸入身高(公分): "))
weight = float(input("請輸入體重(kg): "))
height_m = height_cm / 100
BMI = round(weight / (height_m ** 2), 2)
print(name + "您好:")
print("您的BMI值: " + str(BMI))
SophiaSu0925 commented 1 month ago
name = input("請輸入姓名:")
height = float(input("請輸入身高cm:"))
weight = float(input("請輸入體重kg:"))
BMI = round((weight / ((height*0.01)**2)), ndigits=2)
print(f"{name}您好:")
print(f"您的BMI值是:{BMI}")
grace588 commented 1 month ago
name = input("請輸入姓名")
H= float(input("請輸入身高"))
kg =float(input("請輸入體重"))
BMI=kg/((H*0.01)**2)

print(f'您的BMI是{round(BMI,2)}')
Srdell7 commented 1 month ago
name=input('請輸入姓名:')
height=float(input('請輸入身高(cm):'))
weight=float(input('請輸入體重(kg):'))
BMI=round(weight/((height*0.01)**2),ndigits=2)

print(str(name)+'您好')
print('您的BMI值是:'+str(BMI))
LingYu00000 commented 1 month ago
a=input("請輸入姓名:")
b=float(input("請輸入身高(cm):"))
c=float(input("請輸入體重(kg):"))
d=round(c/((b/100)*(b/100)),2)
print(f"{a}您好,您的BMI值為:{d}")
handsomeyoxi commented 1 month ago
name = input("請輸入姓名:")
height = float(input("請輸入身高(cm):"))
weight = float(input("請輸入體重(kg)"))
m = float(height / 100)
BMI = round(weight / m**2,ndigits=2)

print("您的BMI為:"+str(BMI))
grace588 commented 1 month ago
name = input("請輸入姓名: ")
height_cm = float(input("請輸入身高(cm): "))
weight_kg = float(input("請輸入體重(kg): "))
BMI=kg/((H*0.01)**2)

print(f"{name}您好:")
print(f"您的BMI值是: {bmi:.2f}")
WUnienen commented 1 month ago
n=input("輸入姓名")
h=float(input('輸入身高'))
w=float(input('輸入體重'))
bmi=weight/(((h*0.01))**2)
print(f"{n}的bmi為{bmi}")
teddy-wz commented 1 month ago
name = input('請輸入姓名:')
height_cm = float(input('請輸入身高(cm):'))
weight = float(input('請輸體重(kg):'))
height_m = height_cm *0.01
ans = round(weight / height_m**2, 2)
print(f'{name}您好:')
print(f'您的BMI值是:{ans}')
aa854268 commented 1 month ago
name = input('請輸入姓名:')
height_cm = float(input('請輸入身高(cm):'))
weight = float(input('請輸體重(kg):'))
height_m = height_cm *0.01
ans = round(weight / height_m**2, 2)
print(f'{name}您好:')
print(f'您的BMI值是:{ans}')
jamduh commented 1 month ago

include

int main(void){ char name[20]; float height; float weight;

printf("請輸入姓名:");
scanf("%s",name);

printf("請輸入身高(cm):");
scanf("%f",&height);

printf("請輸入體重(kg):");
scanf("%f",&weight);

double BMI = weight /(height/100)/(height/100);

printf("%s您好:\n");
printf("您的BMI值為:%.2lf \n",BMI);

return 0;

}