Untitled
unknown
plain_text
3 years ago
455 B
10
Indexable
#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;
}Editor is loading...