#include<iostream>
using namespace std;
void OutPut1(int A[][5])
{
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)cout << A[i][j] << " ";
cout << endl;
}
}
void OutPut2(int(*A)[5])
{
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)cout << A[i][j] << " ";
cout << endl;
}
}
void OutPut3(int *A)
{
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
cout << *(A + i * 5 + j) << " ";
cout << endl;
}
}
int main()
{
int A[5][5];
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
A[i][j] = j;
}
}
OutPut1(A);
cout << endl;
OutPut2(A);
cout << endl;
OutPut3((int *)A);
cout << endl;
return 0;
}