#include <iostream>
#include <string>
#include <stdlib.h>

using namespace std;

struct Student {
	string name;
	string matrix;
	int age;
};

Student getStudent();
void displayStudent(const Student &);

int main(void) 
{	
	Student student = {"ali", "mat1101", 23};
	
	student = getStudent();
	
	displayStudent(student);
	
    return 0;
} 

Student getStudent() {
	
	Student student;
	Student student2;
	Student student3;
	
	cout << "Enter student name: ";
	getline(cin, student.name);
	
	cout << "Enter student matrix: ";
	getline(cin, student.matrix);
	
	cout << "Enter student age: ";
	cin >> student.age;	
	
	return student;
}

void displayStudent(const Student &student) {
	cout << "Student name: " << student.name << endl;
	cout << "Student matrix: " << student.matrix << endl;
	cout << "Student age: " << student.age << endl;
}
