// NAME: MD.TAWFIQUZZAMAN
//MATRIC: A20EC4036
//SEC: 06




#include<iostream>
#include<conio.h>
#define newline '\n'

using namespace std;
int main()
{

  struct Subject{
  	 
  	 string name;
  	 char code[10];
  	 int credit;
  	 
  };
  
  struct Tutor{
  	
  	string name;
  	int hours_per_week;
  	struct Subject subjectname;
  };
  
  
  Tutor tutor[4];
  int total_hour = 0;
  float average;
  
  for(int i=0; i<4  ; i++)
   {
   	  cout<<"Please enter tutor "<<i+1<<" information: "<<newline;
   	  
   	  cout<<"Enter tutor "<<i+1<<" name: ";
   	  cin>>tutor[i].name;
   	  
   	  cout<<"Enter tutor "<<i+1<<" hour per week: ";
   	  cin>>tutor[i].hours_per_week;
   	  
   	  cout<<"Enter tutor "<<i+1<<" subject name: ";
   	  cin>>tutor[i].subjectname.name;
   	  
   	  cout<<"Enter tutor "<<i+1<<" subject code: ";
   	  cin>>tutor[i].subjectname.code;
   	  
   	  cout<<"Enter tutor" <<i+1<<" subject credit: ";
   	  cin>>tutor[i].subjectname.credit;
   	  
   	  cout<<newline;
   	  total_hour = total_hour + tutor[i].hours_per_week;
   	  
   	  
   }
   
   for(int i=0; i<4; i++)
    {
    	cout<<"Tutor "<<i+1<< " informations: "<<newline;
    	
    	cout<<"Tutor "<<i+1<<" name: "<<tutor[i].name<<newline;
    	
    	cout<<"Tutor "<<i+1<<" hour per week: "<<tutor[i].hours_per_week<<newline;
    	
    	cout<<"Tutor "<<i+1<<" subject  name: "<<tutor[i].subjectname.name<<newline;
    	
    	cout<<"Tutor "<<i+1<<" subject code: "<<tutor[i].subjectname.code<<newline;
    	
    	cout<<"Tutor "<<i+1<<" subject credit: "<<tutor[i].subjectname.credit<<newline;
    	
    	cout<<newline;
    	average = (float)total_hour/4;
	}
	
      cout<<"Total hour per week of all tutors = "<<total_hour<<newline;
      
      cout<<"Average of hour per week = "<<average<<newline;
      
      cout<<newline;
      cout<<"Thank You So Much! ";
  
  getch();
}
