#include <iostream>
#include <string>
#include <stdlib.h>

using namespace std;

struct Student {
	string name;
	string matrix;
	int age;
};

void getStudentData(Student [], int);
void printStudentData(Student [], int);

int main(void) 
{	
	const int SIZE = 5;
	
	Student students[SIZE];
	getStudentData(students, SIZE);
	printStudentData(students, SIZE);
						     
    return 0;
} 

void getStudentData(Student students[], int size) {
	
	for(int i=0; i<size; i++) {
		cout << "Entering data for student - " << i+1 << endl;
		
		cout << "Enter student name: ";
		cin >> students[i].name;
		
		cout << "Enter student matrix: ";
		cin >> students[i].matrix;
		
		cout << "Enter student age: ";
		cin >> students[i].age;	
		
		system("CLS");	
	}
		
}

void printStudentData(Student students[], int size) {
	for(int i=0; i<size; i++) {
		cout << "Printing data for student - " << i+1 << endl;
		cout << "Student name: " << students[i].name << endl;
		cout << "Student matrix: " << students[i].matrix << endl;
		cout << "Student age: " << students[i].age << endl;	
		cout << endl;
	}
}

