为什么结果都是一样的,求助!
#include<stdio.h>int main()
{
char sex;
float faHeight,moHeight,clHeight;
printf("请输入你的性别:");
sex=getchar();
scanf("%c",&sex);
printf("请输入你父亲的身高:");
scanf("%f",&faHeight);
printf("请输入你母亲的身高:");
scanf("%f",&moHeight);
if(sex='F'){
clHeight=(faHeight+moHeight)*0.54;}
else{
clHeight=(faHeight*0.923+moHeight)/2;}
printf("成人时身高是%.2fcm",clHeight);
return 0;
}