Answer:
600 pupils
Explanation:
Let x represent the number of pupils at the school.
Let y represent the initial number of rooms in the school.
The average before the donation is:
1. x/y
The average after the donation is:
2. x/(y+10)
Set an equation between those two averages (the second line is 10 less than the first):
x/(y+10) + 10 = x/y
The average after the storm is:
x/(y+10-5)
3. x/(y+5)
Create another equation from the second line and third line:
x/(y+5) - 4 = x/(y+10)
We now have two equations and two variables
1. x/(y+10) + 10 = x/y
2. x/(y+5) - 4 = x/(y+10)
Solving them leads to x being 600 and y being 20.
Therefore there are 600 pupils at the school.