#include
struct Person{
char sex;
double high;
double couple;
}
int main()
{
int n;
scanf("%d",&n);
const int N = n;
Person p[N];
for(int i = 0; i< N; i++)
{
scanf("%c",&p[i].sex);
scanf("%lf",&p[i].high);
if(p[i].sex == 'F')
p[i].couple = p[i].high * 1.09;
else if(p[i].sex == 'M')
p[i].couple = p[i],high / 1.09;
else
printf("INPUT ERROR!");
}
for(int i = 0; i< N; i++)
printf("%lf\n",p[i].couple);
return 0;
}
x定义成double的。注意输入格式说明符也要改%lf的
你们学的这么深了