#include<iostream>
using namespace std;
class Student 
{
private :
	char fname[15],lname[15];
	char id[10];
	char major[10];
	double mark1 , mark2 , mark3;

public :
	void input()
		{
		cout<<" Enter your name : ";
		cin>>fname>>lname;
		cout<<"\n Enter your ID : ";
		cin>>id;
		cout<<"\n Enter your major : ";
		cin>>major;
		cout<<"\n Enter your mark1 : ";
		cin>>mark1;
		cout<<"\n Enter your mark2 : ";
		cin>>mark2;
		cout<<"\n Enter your mark3 : ";
		cin>>mark3;
		cout<<"\n Your average is : "<<avrage();
		cout<<"\n - ================================================================== -\n";
		}
	void output()
	{
       cout<<fname<<" "<<lname<<" \t"<<id<<"\t"<<major<<"\t"<<mark1<<"\t"<<mark2<<"\t"<<mark3<<"\t"<<avrage()<<"\n";
	}
	double avrage()
	{
		double avg=(mark1+mark2+mark3)/3;
		return avg;
	}

};
void Domo3()
{
cout<<"   NAME\t\tID\t\MOJER\tMARK1\tMARK2\tMARK3\tAVERAGE\n--------------------------\n";
}
const num =3;

	main()
	{
		Student stud[num];
		for (int a=0; a<num; a++)
		{
		stud[a].input();
		}
		Domo3();
		for (int i=0; i<3; i++)
		{
		stud[i].output();
		}

	}






	int choice ;
			cout<<" ^ Welcome To My Program ^ \n";
		    cout<<"\t  .::. User Menu .::. \n";
			cout<<" -===================================-\n";
			cout<<" 1- Enter Section information : \n";
			cout<<" 2- print student average : \n";
			cout<<" 3- print Section average : \n";
			cout<<" 4- print student information : \n";
			cout<<" 5- print all Section information : \n";
			cout<<" 6- Exite \n";
			cout<<" Please enter your choice :  ";
			if (choice==1)
			{ cout<<"1- Enter Section information : \n";
			cout<<" 		cout<<" Enter your name : ";
		cin>>fname>>lname;
		cout<<"\n Enter your ID : ";
		cin>>id;
		cout<<"\n Enter your major : ";
		cin>>major;}
			else 
				if (choice==2)
				{ 		cout<<"\n Enter your mark1 : ";
		cin>>mark1;
		cout<<"\n Enter your mark2 : ";
		cin>>mark2;
		cout<<"\n Enter your mark3 : ";
		cin>>mark3;}
				else if (choice==3)
				{ cout<<avrage();}
				else if (choice==4)
					{cout<<" Enter your name : ";
		cin>>fname>>lname;
		cout<<"\n Enter your ID : ";
		cin>>id;
		cout<<"\n Enter your major : ";
		cin>>major;
		cout<<"\n Enter your mark1 : ";
		cin>>mark1;
		cout<<"\n Enter your mark2 : ";
		cin>>mark2;
		cout<<"\n Enter your mark3 : ";
		cin>>mark3;
		cout<<"\n Your average is : "<<avrage();
		cout<<"\n - ================================================================== -\n";}

