ok, i need to finish my computing coursework by wednesday. all i need to finish is the usage stats. but im stuck here goes;
i have my bookings stucture as
Code:
```struct booking
{
int booker_id;
int week, day, time;
int event_title;
int fee_owed;
}

bookings booking[50];```
its for a village hall booking program btw dancing, oragami etc.

i have 1 - 9 representing the 9 weeks in 2 months.
1 - 6 representing the number of days (not open sunday)
and 1 - 4 representing the 4 different time zones allowed to book.

now i need to work out a percentage statistics for each weekly slot usage. how can i do it!!!
ive been trying swich statements but the code just ends up redicuroulsy big, and not sure how a for loop would work.
any help would be much appreciated, just ask if your not sure of the stucture.

2. There are more then eight weeks in 2 months unless you have two Februarys in 2 months.

3. thanks for that. it needs to be for jan and feb. will edit the post.

4. Right so that is excluding a leap year....31+28 days which is 7 and a tiny bit weeks.

Well do you mean that you have 4 slots per day?

So that is 24 slots per week.

So say you use 10 slots...that would be 41.66666666666% of your weekly usage.

5. no sorry, there is 6 days you can book a week mon - sat.
and 4 daily time slots like 9am to 10.30pm, 11pm to 1.30pm etc.
when people book they all dont book every slot of every day, some will book mon period 1 another tuesday period 2 etc.

6. Yes...and you want to know the percentage used out of the amount available per week?

7. yes but it has to be for each weekly time slot so mon period 1 43% tues period 2 53% etc.
but for over 2 months.

8. Do you mean the percentages of mondays that you are using up or what?

9. e.g.
there are 9 mon period 1s, if 4 are booked then mon period 1 = 44%
there are 9 mon period 2s, if 6 are booked then mon period 2 = 66%

10. and you want to find the percentage of every period used?

11. Originally Posted by bumfluff
and you want to find the percentage of every period used?
yes. so ill have a usage percentage for every matching time slot in the 2 month period.

12. right erm I might have an idea.

Are you taking in bookings?

13. yes i need to produce booking examples like joe blogs - week 1 - mon 1 - period 2 - dancing

14. I am afriad that I know nothing about structures as I am a noob but if you can tell me how to read the day and the period then I think I have a way of doing it.

15. There must be a number associate with monday period 1 and tuesday period 2 etc.