FinTechathon2021微众银行第三届金融科技高校技术大赛,旨在打造金融科技领域最具影响力的高校科技赛事,是面向前沿技术领域人工智能(AI)和区块链(Blockchain)学生团队的竞赛活动。
该楼层疑似违规已被系统折叠隐藏此楼查看此楼
#include
#include
int main()
{
char sex,sports,diet;
float faHeight,moHeight,Height;
printf("请输入父亲身高\n,请输入母亲身高\n,请输入性别\n");
scanf("%f%f%c",&faHeight,&moHeight,&sex);
switch(sex)
{
case'F':Height=(faHeight+moHeight)*054;printf("%f\n",Height);break;
case'M':Height=(faHeight*0.923+moHeight)/2;printf("%f\n",Height);break;
default:printf("enter data error!\n");
}
printf("%f\n",Height);
scanf("%c%c\n",&diet,&sports);
printf("请输入是否健康饮食,请输入是否适当运动");
switch(diet)
{
case'Y':Height=Height*1.015;printf("%f\n",Height);break;
case'N':printf("%f\n",Height);break;
default:printf("enter data error!\n");
}
printf("%f\n",Height);
switch(sports)
{
case'Y':Height=Height*1.02;;printf("%f\n",Height);break;
case'N':printf("%f\n",Height);break;
default:printf("enter data error!\n");
}
return 0;
}