Open roberthsu2003 opened 1 month ago
kg_taiwan = float(input('請輸入台斤:'))
kg = kg_taiwan * 0.6
#print(str(kg_taiwan) + "台斤=" + str(kg) + "公斤")
print(f'{kg_taiwan}台斤={kg}公斤') #字串插補
H = float(input("輸入身高(cm)"))
kg = float(input("輸入體重(kg)"))
BMI = kg / ((H*0.01)**2)
print(f"你的BMI是{round(BMI,2)}")
a=float(input("name"))
b=float(input("身高(cm)"))
c=float(input("體重(kg)"))
d=c/((0.01b)(0.01*b))
print(f"{a}您好,您的BMI值是{d}。")
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}')
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}')
name=input("請輸入姓名")
height=float(input('請輸入身高'))
weight=float(input('請輸入體重'))
bmi=weight/(((height*0.01))**2)
print(f"{name}的bmi為{bmi}")
print("你的體重"float(input(輸入體重(kg)"))/hight = float(input("輸入身高(cm)")*0.01))
name = input("請輸入姓名: ")
height = float(input("請輸入身高:"))
weight = float(input("請輸入體重:"))
print(f"{name}您好:")
print(f"您的 BMI 值為: {round(weight / (height*0.01)**2, 2)}")
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}')
H = float(input("輸入身高(cm)"))
kg = float(input("輸入體重(kg)"))
BMI = kg / ((H*0.01)**2)
print(f"你的BMI是{round(BMI,2)}")
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}')
name = str(input("請輸入姓名"))
kg = float(input('請輸入體重:'))
cm = float(input('請輸入身高:'))
bmiresult = float(kg / (cm *0.01* cm*0.01))
print (f'您的BMI值是{bmiresult}')
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}')
name=input('請輸入姓名:')
h=float(input('請輸入身高(cm):'))
w=float(input('請輸入體重(kg):'))
bmi=w/(h/100)**2
print(name+f'您好:\n您的BMI值是:{bmi}')
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))
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}')
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}')
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}')
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}")
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}")
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}')
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}")
N = str(input("請輸入姓名:"))
H = float(input("身高(cm):"))
W = float(input("體重(kg):"))
BMI = round(W / (H/100)**2, ndigits=2)
print(f'{N}您好: 您的BMI值是:{BMI}')
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))
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}")
name = input("請輸入姓名")
H= float(input("請輸入身高"))
kg =float(input("請輸入體重"))
BMI=kg/((H*0.01)**2)
print(f'您的BMI是{round(BMI,2)}')
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))
a=input("請輸入姓名:")
b=float(input("請輸入身高(cm):"))
c=float(input("請輸入體重(kg):"))
d=round(c/((b/100)*(b/100)),2)
print(f"{a}您好,您的BMI值為:{d}")
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))
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}")
n=input("輸入姓名")
h=float(input('輸入身高'))
w=float(input('輸入體重'))
bmi=weight/(((h*0.01))**2)
print(f"{n}的bmi為{bmi}")
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}')
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}')
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;
}
輸入:
輸出:
xxx您好: 您的BMI值是:23.45