#include <stdio.h>
#include <string.h>

struct classroom
{
char nameofroom[6];
int noofcomputers;
float hoursusedperweek;
int noofwhiteboards;
};

void main()
{
classroom soac[6];  //declare array of structures
float total=0;
int i;
strcpy(soac[0].nameofroom,"MH302");
soac[0].noofcomputers=18;
soac[0].hoursusedperweek=20.5;
soac[0].noofwhiteboards=1;

strcpy(soac[1].nameofroom,"MH303");
soac[1].noofcomputers=1;
soac[1].hoursusedperweek=25;
soac[1].noofwhiteboards=2;

for(i=0;i<2;i++)
{
	total=total+soac[i].hoursusedperweek;
}

for(i=0;i<2;i++)
{
	printf("\nName of room: %s",soac[i].nameofroom);
	printf("\nNumber of whiteboards: %d",soac[i].noofwhiteboards);
}

printf("\n\nTotal use of rooms %f \n\n",total);
}