Untitled

 avatar
unknown
plain_text
2 years ago
809 B
3
Indexable
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
struct KOT {
	int lives = 9;
	float tail_length;
	int age;
	string sex;
};
int VivodKrutosti(float krutost) {

	if (krutost > 10) {
		cout << "ОГО мур-мяу";
	}
	else if (krutost > 5) {
		cout << "Мур";
	}
	else cout << "иди подкачайся";
	return 0;
}
int KrutostOfCat(KOT kot) {
	float krutost;
	krutost = kot.tail_length * float(kot.age) / float(kot.lives);
	return VivodKrutosti(krutost);
}
int main() {
	setlocale(LC_ALL, "Russian");
	KOT kot;
	cout << "длина хвоста - "; cin >> kot.tail_length; cout << '\n';
	cout << "возраст - "; cin >> kot.age; cout << '\n';
	cout << "пол(male/female) - "; cin >> kot.sex; cout << '\n';
	KrutostOfCat(kot);

}
Editor is loading...