啊啊啊啊好无聊 蛋疼
aa吧
全部回复
仅看楼主
level 1
lamlovezizi 楼主
2016年10月28日 01点10分 1
level 1
#include <stdio.h>
main()
{
sex F,M;
float faHeight,moHeight,yourHeight;
sports Y,N;
diet Y,N;
printf("性别 F代表男性M代表女性:\n",sex);
scanf("%c",&sex);
printf("你父母的身高 父,母: \n");
scanf("%if,%if,&faHeight,&moHeight");
printf("是否喜欢体育运动,Y代表喜欢 N代表不喜欢:\n");
scanf("%c,%c,&sports");
printf("是否有良好饮食习惯,Y代表是,N代表不是:\n");
scanf("%c,&diet");
if(sex==F)
yourHeight = (faHeight*0.923+moHeight)/2
else
yourHeight = (faHeight+moHeight)*0.54
if(sports==Y)
yourHeight = yourHeight*1.02
else
if(diet==Y)
yourHeight = yourHeight*1.05
printf("%if yourHeight:\n",yourHeight);
}
2016年11月01日 10点11分 2
1