全部评论 3

  • #include<bits/stdc++.h>
    using namespace std;
    struct student{
    	string name;
    	double sc;
    	int age;
    }a[10010];
    int main(){
    	int n;
        cin >> n;
        for (int i = 0; i < n; i++){
    		cin >> a[i].name >> a[i].sc >> a[i].age; 
    	} 
    	for (int i = 0; i < n; i++){
    		cout << a[i].name << " " ;
            printf("%.1f ",a[i].sc);
            cout << a[i].age << endl; 
    	} 
    
        return 0;
    }
    

    2024-10-27 来自 浙江

    0
  • printf("%.1lf",x[i].fen);
    

    2024-07-30 来自 浙江

    0
  • 分数要用printf保留一位小数哦,亲~

    2024-01-06 来自 北京

    0
首页