真服了,一直没发现要保留小数后一位输出
2024-08-25 16:45:39
发布于:福建
40阅读
0回复
0点赞
题解如下:
#include <bits/stdc++.h>
using namespace std;
struct stu{
string n;
double ch;
long long age;
}x[1010];
int main() {
long long n;
cin>>n;
for(int i=0;i<n;i++){
cin>>x[i].n>>x[i].ch>>x[i].age;
}
for(int i=0;i<n;i++){
cout<<x[i].n<<" ";
printf("%.1f",x[i].ch);
cout<<" "<<x[i].age<<endl;
}
return 0;
}
全部评论 1
AC了,放心
2024-08-25 来自 福建
0AC了,放心
2024-08-25 来自 福建
0AC了,放心
2024-08-25 来自 福建
0AC了,放心
2024-08-25 来自 福建
0
有帮助,赞一个