作者:yunjinqi 类别:
日期:2023-05-31 16:51:23
阅读:455 次 消耗积分:0 分
#include <stdio.h>
int main(){
int n;
char gender;
double height;
double t;
if (scanf("%d",&n)!=EOF){
double target[10];
int count=0;
for(int i=0;i<n;i++){
if (scanf(" %c %lf",&gender,&height)!=EOF){
// printf("%d %d %c %lf\n",n,i,gender,height);
if (gender=='F'){t=height*1.09;target[count]=t;count++;}
if (gender=='M'){t=height/1.09;target[count]=t;count++;}
// printf("%d %d %c %lf\n",n,i,gender,height);
}
}
for (int i=0;i<n;i++){
printf("%.2f\n",target[i]);
}
}
else{
printf("input wrong");
}
return 0;
}