Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
455 B
2
Indexable
Never
#include <iostream>
using namespace std;
struct agroscholnik
{
	string name;
	int clas;
	int otchenka;
	int power;
	int propyski;
};
int main() 
{
	agroscholnik scholnik;
	int a, b = 0, c = 0;
	for (int i = 0; i < 3; i++)
	{
		cin >> scholnik.power;
		cin >> scholnik.propyski;
		a = scholnik.power * scholnik.propyski;
		if (a > b) 
		{ 
			b = a;
			c = i+1;
		};
	}
	cout << "krytoi agroskholnik " << c << " power == " << b;
}