#include <stdio.h>int main()
{ doule Father; double Mother; double Me;
printf("请输入父亲的身高\n"); scanf("%f",&Father); printf("请输入妈妈的身高\n"); scanf("%f",&Mother); Me=(Father+Mother)*0.54; printf("预测孩子的身高是%f\n",Me); return 0;
}
收起
double 类型使用%lf
#include <stdio.h> int main() { double Father; double Mother; double Me; printf("请输入父亲的身高\n"); scanf("%lf",&Father); printf("请输入妈妈的身高\n"); scanf("%lf",&Mother); Me=(Father+Mother)*0.54; printf("预测孩子的身高是%lf\n",Me); return 0; }
报告相同问题?