
#include <iomanip>
#include <iostream>

using namespace std;

struct NOTE {
    char name[10];
    char surname[15];
    int date_of_birthday[3];
    double salary;
};

void show(const int size, int* pmatrix); // show matrix

void show(NOTE* pstruct); // show structure


int main()
{
    const int size = 3;
    int matrix[size][size] = { {1, 7, 4},
                               {2, 2, 8},
                               {9, 9, 4} };

    int* pmatrix = &matrix[0][0];

    show(size, pmatrix);

    NOTE structure;
    structure.name = "2";

    NOTE* pstruct = &structure;
}

void show(const int size, int* pmatrix) // show matrix
{
    for (int i = 0; i < size*size; i++)
    {
        if ((i % size == 0) && (i != 0)) 
        {
            cout << '\n' << *(pmatrix + i);
        }

        else 
        {
            cout << *(pmatrix + i);
        }
    }
}

void show(NOTE* pstruct) // show structure 
{
    cout << setw(10) << "Name: " << setw(15) << pstruct->name << "  |  " << "\t";
    cout << setw(10) << "Surname: " << setw(15) << pstruct->surname << "  |  " << "\t";
    cout << setw(10) << "Date of birthday: ";
    for (int j = 0; j < 3; j++) {
        cout << setw(4) << pstruct->date_of_birthday[j] << "  ";;
        if (j == 2) cout << "  |  ";
    };
    cout << setw(10) << "Salary: " << pstruct->salary << endl;

}