include <iostream> using namespace std; struct PlayerInfo { string surname; string command; string position; int kol_zabityh_myachey; int kol_peredach; int kol_tochnyh_peredach; float distance; }; int main() { int n, max; max = 0; cout << "kolplaeers" << '\n'; cin >> n; PlayerInfo players[n]; for (int i = 0; i < n; i++) { cout << "surname: " << i << '\n'; cin >> players[ i ].surname; cout << "command " << players[ i ].surname << '\n'; cin >> players[ i ].command; cout << "position " << players[ i ].surname << '\n'; cin >> players[ i ].position; cout << "kol_zabityh_myachey " << players[ i ].surname << '\n'; cin >> players[ i ].kol_zabityh_myachey; cout << "kol_peredach " << players[ i ].surname << '\n'; cin >> players[ i ].kol_peredach; cout << "kol_tochnyh_peredach " << players[ i ].surname << '\n'; cin >> players[ i ].kol_tochnyh_peredach; cout << "distance " << players[ i ].surname << '\n'; cin >> players[ i ].distance; } for (int i = 0; i < n; i++) { if (players[ i ].kol_peredach - players[ i ].kol_tochnyh_peredach > max) max = players[ i ].kol_peredach - players[ i ].kol_tochnyh_peredach; } cout << max; return 0; } Closed due to the fact that off-topic participants αλεχολυτ , Kromster , Nicolas Chabanovsky ♦ 21 Nov '16 at 5:06 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
- “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - αλεχολυτ, Kromster, Nicolas Chabanovsky
- Maximum what are you looking for? - Vlad from Moscow
|