//---------------------------------------------------------------------------
. . . . . . . . . . . . . . . . . . . . . . . .
#include <vcl.h> //!!! Только для C++ Builder
#include <stdio.h>
#include <conio.h>
. . . . . . . . . . . . . . . . . . . . . . . .
//---------------------------------------------------------------------------
. . . . . . . . . . . . . . . . . . . . . . . .
class TMatrix
{
public:
void Input(int M1[5][4]);
void Output(int M1[5][4]);
};
void TMatrix::Input(int M1[5][4])
{
for (int i=0;i<5;i++)
for (int j=0;j<4;j++)
M1[i][j]=i*j;
};
void TMatrix::Output(int M1[5][4])
{
for (int i=0;i<5;i++)
for (int j=0;j<4;j++)
printf("M[%d][%d] = %d\n\r",i,j,M1[i][j]);
};
. . . . . . . . . . . . . . . . . . . . . . . .
//---------------------------------------------------------------------------
. . . . . . . . . . . . . . . . . . . . . . . .
int main(int argc, char* argv[])
{
int M[5][4];
TMatrix *Matrix = new TMatrix();
Matrix -> Input(M);
Matrix -> Output(M);
getch();
return 0;
}
//---------------------------------------------------------------------------