为啥这个c语言上机实验程度运行不了

#include <stdio.h>int main(){ float faHeight, moHeight, womanHeight, manHeight; char sex, sports, diet; printf("请输入sex,女孩用F,男孩用M\n"); scanf("%c", &sex); printf("性别是%c\n", sex); printf("请输入faHeight,moHeight:\n"); scanf("%f%f", &faHeight, &moHeight); fflush(stdin); printf("你喜欢sports吗,喜爱用Y,不喜爱用N\n"); scanf("%c", &sports); fflush(stdin); printf("是否具有良好的diet,良好用Y,不良好用N\n"); scanf("%c", &diet); fflush(stdin); if (sex == 'F') { if (sports == 'Y') { if (diet == 'Y') { womanHeight = (faHeight * 0.923 + moHeight) * (1 + 0.02) * (1 + 0.015) / 2;//女性,饮食良好,喜爱锻炼 } else { womanHeight = (faHeight * 0.923 + moHeight) * (1 + 0.02) / 2;//女性,饮食不良好,喜爱锻炼 } if (sports == 'N') { if (diet == 'Y') { womanHeight = (faHeight * 0.923 + moHeight) * (1 + 0.015) / 2;//女性,饮食良好,不喜爱运动 } else { womanHeight = (faHeight * 0.923 + moHeight) / 2;//女性,饮食不良好,不喜爱运动 } } } } if (sex == 'M'); { if (sports == 'Y') { if (diet == 'Y') } { manHeight = (faHeight + moHeight) * (1 + 0.02) * (1 + 0.015) * 0.54;//男性,饮食良好,喜爱锻炼 } else { manHeight = (faHeight + moHeight) * (1 + 0.02) * 0.54;//男性,饮食不良好,喜爱锻炼 } if (sports == 'N') { if (diet == 'Y') { manHeight = (faHeight + moHeight) * (1 + 0.015) * 0.54;//男性,饮食良好,不喜爱锻炼 } else { manHeight = (faHeight + moHeight) * 0.54;//男性,饮食不良好,不喜爱锻炼 } printf("孩子的身高是: %f\n", womanHeight, manHeight); system(pause); return 0; } }

这咋看!你按c格式重新发一遍吧

#include <stdio.h>
int main()
{
float faHeight, moHeight, womanHeight, manHeight;
char sex, sports, diet;
printf("请输入sex,女孩用F,男孩用M\n");
scanf("%c", &sex);
printf("性别是%c\n", sex);
printf("请输入faHeight,moHeight:\n");
scanf("%f%f", &faHeight, &moHeight);
fflush(stdin);
printf("你喜欢sports吗,喜爱用Y,不喜爱用N\n");
scanf("%c", &sports);
fflush(stdin);
printf("是否具有良好的diet,良好用Y,不良好用N\n");
scanf("%c", &diet); fflush(stdin);
if (sex == 'F') {
if (sports == 'Y')
{ if (diet == 'Y')
{ womanHeight = (faHeight * 0.923 + moHeight) * (1 + 0.02) * (1 + 0.015) / 2;//女性,饮食良好,喜爱锻炼
}
else
{ womanHeight = (faHeight * 0.923 + moHeight) * (1 + 0.02) / 2;//女性,饮食不良好,喜爱锻炼
}
if (sports == 'N')
{ if (diet == 'Y')
{ womanHeight = (faHeight * 0.923 + moHeight) * (1 + 0.015) / 2;//女性,饮食良好,不喜爱运动
}
else
{ womanHeight = (faHeight * 0.923 + moHeight) / 2;//女性,饮食不良好,不喜爱运动
}

} 
    
} 
    
} 
if (sex == 'M') {
    if (sports == 'Y') 
    { if (diet == 'Y') 
    { manHeight = (faHeight + moHeight) * (1 + 0.02) * (1 + 0.015) * 0.54;//男性,饮食良好,喜爱锻炼 
    } else 
    { manHeight = (faHeight + moHeight) * (1 + 0.02) * 0.54;//男性,饮食不良好,喜爱锻炼
    } 
    if (sports == 'N') 
    { if (diet == 'Y')
    { manHeight = (faHeight + moHeight) * (1 + 0.015) * 0.54;//男性,饮食良好,不喜爱锻炼
    } 
    else 
    { manHeight = (faHeight + moHeight) * 0.54;//男性,饮食不良好,不喜爱锻炼 
    } 
    printf("孩子的身高是: %f\n", womanHeight, manHeight); 
    
    return 0; 
        
    } }
}
}