题解
2025-07-17 20:47:00
发布于:江苏
18阅读
0回复
0点赞
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
double n;
string s;
cin>>n>>s;
if(s=="in"){
printf("%.2f",n*2.54);
cout<<" cm";
}else if(s=="cm"){
printf("%.2f",n/2.54);
cout<<" in";
}else{
cout<<"error";
}
return 0;
}
这里空空如也
有帮助,赞一个