Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C++ by Dmitriy ( 16 years ago )
#include < iostream > 
#include < iomanip > 
#include < math.h >

using namespace std;

void main()
{
 int n, m, i, j, max,q=0;
 cout << " Vvedite kol-vo strok i stolbcov:" << endl ;
 cin >> n >> m;
 int **a = new int *[n] ;
 for( i = 0; i<n ; i++)
  a[i] = new int [m] ;
 for (i = 0; i<n ; i++)
 {
  cout << "Vvedite dlya " << i+1 << " sportsmena " << m << " rezul'tatov " << endl;
  for (j = 0; j<m; j++)
   cin >> a[i][j];
 }
 max = a[1][1];

 for (i = 0; i<n ; i++)
  for (j = 0; j<m; j++)
   if (max < a[i][j])
   {
    max = a[i][j];
    q=i;
   }

cout << " Pobeditel! " << q << endl;
}

 

Revise this Paste

Your Name: Code Language: