结构体
2025-03-10 17:45:59
发布于:浙江
#include<bits/stdc++.h>
using namespace std;
struct student{
string name,gender;
int age;
double weight;
};
int main(){
student a;
cin>>a.name>>a.gender>>a.age>>a.weight;
cout<<a.name<<" "<<a.gender<<" "<<a.age<<" ";
printf("%.2lf",a.weight);
return 0;
}
这里空空如也
有帮助,赞一个