为什么这个程序不能输入完全我想要输入的数据?
求身高问题#include "stdio.h"
void main()
{
float faheight,moheight,myheight;
char sex,sport,diet;
printf("faheight and moheight:\n");
scanf("% f,% f",&faheight,&moheight);
printf("are you a boy(y/n):\n");
scanf("%c",&sex);
printf("do you like sports:(y/n)\n");
scanf("% c",&sport);
printf("do you have healthy diet(y/n):\n");
scanf("% c",&diet);
if(sex=='m'||sex=='M')
myheight=(faheight+moheight)*0.54;
else
myheight=(faheight*0.923+moheight)/2;
if(sport=='y'||sport=='Y')
myheight=myheight*(1+0.02);
if(diet=='y'||diet=='Y')
myheight=myheight*(1+0.015);
printf("myheight=%f\n",myheight);
}