Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
819 B
2
Indexable
Never
#include <iostream>
using namespace std;

int abo(int a);
int krut(int a, double b, int c);

struct kot{
int life;
double leng;
int age;
char sex;
};

 int krut(int a, double b, int c) {
    double d;
    d = (a * b) / c;    
    return abo(d);
}
int  abo(int a) {
    if (a > 10) {
        return 1;
    }
    if (a > 5 && a <= 10) {
        return 2;
    }
    else return 3;
}

void boo(int a) {
    if (a == 1) {
        cout << " Ого мур мяу ";
    }
    if (a == 2) {
        cout << " Мяу ";
    }
    if (a == 3) {
        cout << "Иди подкачайся ";
    }
}

int main()
{
    setlocale(LC_ALL,"russian");
    kot l;
    int a,c, d, e;
    double b;
    cin >> l.age >> l.leng >> l.life;
    d = krut(l.age, l.leng, l.life);
    boo(d);
}