1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
void checkavailboys(int &x)
{
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l,m,n,o,p;
cout<<"The no of rooms which are not allocated are:\n";
for(i=0;i<6;i++)
{
for(j=0;j<50;j++)
for(k=0;k<2;j++)
{if((a[i].h2bac[j][k]).compare("")==0)
a++;
if((a[i].h2bnac[j][k]).compare("")==0)
b++;
}
for(l=0;l<100;j++)
for(m=0;m<4;j++)
{if((a[i].h4bac[j][k]).compare("")==0)
c++;
if((a[i].h4bnac[j][k]).compare("")==0)
d++;
}
for(n=0;n<80;j++)
for(o=0;o<6;j++)
{
if((a[i].h6bac[j][k]).compare("")==0)
e++;
if((a[i].h6bnac[j][k]).compare("")==0)
f++;
}
cout<<"Block no:"<<i<<"2bed ac:"<<a<<endl<<"2bed non ac:"<<b<<endl<<"4bed ac:"<<c<<endl<<"4bed non ac:"<<d<<endl<<"6bed ac:"<<e<<endl<<"6bed non ac:"<<f<<endl;
}
}
|