《03 00 C语言 全59讲 主讲-苏小红 哈尔滨工业大学》百度网盘资源免费下载
链接: https://pan.baidu.com/s/1YAxqTBta2f0LJoGW2eytGw
?pwd=riuy 提取码: riuy03 00 C语言 全59讲 主讲-苏小红 哈尔滨工业大学|各学科 学习视频目录|1-30讲|课程目录.txt|C语言哈工大教材 苏小红.jpg|9.flv|8.flv|7.flv|6.flv|5.flv|4.flv|30.flv|3.flv|29.flv|28.flv
include ltstdio.hmain()
{
char sex,sports,diet
float faHeight,moHeight,yourHeight
printf(sex F or M: , fatherHeight and motherHeight: ,
Whether like sports Y or N: , Whether have good diet Y or N:n)
scanf(%c,%f,%f,%c,%c,sex,faHeight,moHeight,sports,diet)
if (sex==F){
if (sports==Y){
if (diet==Y){
yourHeight=(faHeight*0.923+moHeight)*0.54*1.02*1.15
}
else{
yourHeight=(faHeight*0.923+moHeight)*0.54*1.02
}
}
else{
if (diet==Y){
yourHeight=(faHeight*0.923+moHeight)*0.54*1.15
}
else{
yourHeight=(faHeight*0.923+moHeight)*0.54
}
}
}
else {
if (sports==Y){
if (diet==Y){
yourHeight=(faHeight+moHeight)*0.5*1.02*1.15
}
else{
yourHeight=(faHeight+moHeight)*0.5*1.02
}
}
else{
if (diet==Y){
yourHeight=(faHeight+moHeight)*0.5*1.15
}
else{
yourHeight=(faHeight+moHeight)*0.5
yourHeight=(faHeight+moHeight)*0.5
}
}
}
printf(yourHeight is %f cm,yourHeight)
}