#include<stdio.h>
int main()
{
int i,j,n,m;
doublep,b,x=0.0;
char q;
scanf("%d",&n);
while(n--){
scanf(" %c %lf",&q,&b);
if(q=='M')
x=b/1.09;
else
x=b*1.09;
printf("%lf\n",&x);
}
return 0;
}
#include<stdio.h>
int main()
{
int i,j,n,m;
doublep,b,x=0.0;
char q;
scanf("%d",&n);
while(n--){
scanf(" %c %lf",&q,&b);
if(q=='M')
x=b/1.09;
else
x=b*1.09;
printf("%lf\n",&x);
}
return 0;
}
输入时,不要加空格。scanf("%c%lf",&q,&b);
输出时,不用取地址&。printf("%lf\n",x);
#include<stdio.h>
int main()
{
int i,j,n,m;
doublep,b,x=0.0;
char q;
scanf("%d",&n);
while(n--){
scanf("%c%lf",&q,&b);
if(q=='M')
x=b/1.09;
else
x=b*1.09;
printf("%lf\n",x);
}
return 0;
}