}
int show(TTcell cl)
{
cout<<"\nEnter Time (0(9:00),1(10:00),2(11:00),3(12:00),4(1:00),5(2:00),6(3:00),7(4:00),8(5:00)):\n";
cin>>cl.tm;
cout<<"Enter Day (Mon,Tue,Wed,Thur,Fri):\n";
cin>>cl.dy;
cout<<"\t"<<cl.Subject[i][j];
cout<<cl.Lecturer[i][j];
cout<<cl.RoomNo[i][j];
cout<<"\n";
}
}
}
}
int data(TTcell cl)
{
cout<<"\nEnter No of Rows and Coloumns\n";
cin>>cl.n;
cout<<"\n";
cin>>cl.m;
do{
cout<<"Choose the option:\n";
cout<<"1.Clear Timetable\n";
cout<<"2.Insert Timetable\n";
cout<<"3.Show \n";
cout<<"4.Show Timetable\n";
cin>>cl.ch;
switch(cl.ch)
{
case 1: ClearTimetable(cl);
break;
case 2: inserttimetable(cl);
break;
case 3: show(cl);
break;
case 4: showtimetable(cl);
break;
}
cout<<"Do you want to access the menu?\n";
cin>>cl.c;
} while(cl.c=='y'||cl.c=='Y');
}
int main()
{
TTcell cl;
cout<<"Enter the Timetable you want to access:\n";
cout<<"1.Winter\n";
cout<<"2.Spring\n";
cout<<"3.Summer\n";
cout<<"4.Autumn\n";
cin>>cl.cd;
switch(cl.cd)
{
case 1: data(cl);
break;
case 2: data(cl);
break;
case 3: data(cl);
break;
case 4: data(cl);
break;
}
}