Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
473 B
1
Indexable
Never
#include <iostream>
using namespace std;
struct gnom
{
    char pol;
    int age;
    int height;
};

int main()
{
    gnom gnomich;
    cin >> gnomich.pol >> gnomich.age >> gnomich.height;
    gnom gnom2;
    cin >> gnom2.pol >> gnom2.age >> gnom2.height;
    if (gnom2.height > gnomich.height)cout << gnom2.age;
    if (gnom2.height < gnomich.height)cout << gnomich.age;
    if (gnom2.height == gnomich.height)cout << gnom2.age << " "<< gnomich.age;
}