Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
715 B
1
Indexable
Never
#include <iostream>
#include <string>
using namespace std;

struct gnom {
    string name;
    int clas;
    char classs;
    float ocenka;
};
int main()
{
    gnom girl;
    gnom girll;
    gnom girlll;

    cin >> girl.name >> girl.clas >> girl.classs >> girl.ocenka;
    cin >> girll.name >> girll.clas >> girll.classs >> girll.ocenka;
    cin >> girlll.name >> girlll.clas >> girlll.classs >> girlll.ocenka;

    if (girl.ocenka > girll.ocenka && girl.ocenka > girlll.ocenka) cout << girl.name;
    else if (girll.ocenka > girl.ocenka && girll.ocenka > girlll.ocenka) cout << girll.name;
    else if (girlll.ocenka > girl.ocenka && girlll.ocenka > girll.ocenka) cout << girlll.name;
}