Prog
Prog
#include <iomanip>
using namespace std;
class table{
private:
string data;
public :
void setdata(string x)
{
data=x;
}
void showdata() // member function
{
cout << data<< endl;
}
};
int main()
{ int day , clas , sec , per ;
if (clas==2)
{
cout<< "enter sec 1,2,3or4 \n";
cin >> sec;
cout<< "enter the period\n";
cin >> per;
string second[6][5][5];
second[1][1][1]={"Section: Mechanics of Mechanics \nEng:mahmoud essam\
nplace:M320\\n "};
second[1][2][1]={"Section: Mechanics of Mechanics \nEng:al-hosseini mohammed \
nplace:M321\n "};
second[1][3][1]={"Section: computer lab\nEng:ahmed gamal \nplace:stud.lab \
n"};
second[1][4][1]={"Section: fluid \nEng:aly mortada \nplace:F309 \n"};
second[1][1][4]={"free:)"};
second[1][2][4]={"Section: computer lab\nEng:ahmed hesham \nplace:stud.lab \
n"};
second[1][3][4]={"Section: metal catting \nEng:hend abd-elhafiz \nplace: M320\
n"};
second[1][4][4]={"Section: metal catting \nEng:reda mohammed \nplace: M320\
n"};
second[3][1][4]={"free \n"};
second[3][2][4]={"free \n"};
second[3][3][4]={"free \n"};
second[3][4][4]={"free \n"};
second[5][1][3]={"free\n"};
second[5][2][3]={"free\n"};
second[5][3][3]={"free\n"};
second[5][4][3]={"free\n"};
second[5][1][4]={"free\n"};
second[5][2][4]={"free\n"};
second[5][3][4]={"free\n"};
second[5][4][4]={"free\n"};
table d1 ;
d1.setdata(second [day][sec][per]);
d1.showdata();
char agg='c';
}
return 0;
}