Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <clocale>
- #include <iomanip>
- using namespace std;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- int sum = 0, max = 0;
- int A[8][5];
- for (int i = 0; i < 8; i++)
- {
- for (int j = 0; j < 5; j++)
- {
- cout << "Спортесмен: " << i + 1 << endl << "Балов за " << j + 1 << " вид спорта : ";
- cin >> A[i][j];
- }
- }
- cout << "|Спортсмен| 1 | 2 | 3 | 4 | 5 |" << endl;
- cout << "|-----------------------------|";
- for (int i = 0; i < 8; i++)
- {
- sum = 0;
- cout << endl;
- cout << "| " << i + 1 << " |";
- for (int j = 0; j < 5; j++)
- {
- cout << " " << A[i][j] << " |";
- }
- for (int k = 0; k < 5; k++)
- {
- if (max < A[i][k])
- {
- max = A[i][k];
- }
- sum = sum + A[i][k];
- }
- cout << " Crednyaa " << sum / 5;
- cout << endl << "|-----------------------------|";
- }
- cout << " Maximalnaya ocenka " << max;
- cin.get(); cin.get();
- }
Advertisement
Add Comment
Please, Sign In to add comment