#include <stdio.h>int main(){int father_h,mother_h,child_h;int heigh;int gender;printf("请输入某同学性别(1表示男,2表示女):");scanf("%c",&gender);printf("请输入某同学父亲身高(cm):"); scanf("%d",&father_h);printf("请输入某同学母亲身高(cm):"); scanf("%d",&mother_h);printf("请输入某同学身高(cm):"); scanf("%d",&child_h);if (gender==1){ heigh=(father_h+mother_h)*1.08/2;} else { heigh=(father_h*0.923+mother_h)/2;}printf("理论身高为:%d\n",heigh);if(heigh-3<=child_h||child_h<=heigh+3) printf("与公式相符\n");elseprintf("与公式不符\n");return 0;} 请指出错误 不胜感激!!!
- 3 回答
- 0 关注
- 1383 浏览
添加回答
举报
0/150
提交
取消