Let the number of students that turned up for the picnic be N. The budget for the food was 480. The amount per student was 480/N. If the eight students that did not turn up had also come the total number of students would be N + 8 and the amount payable by each student would have been 480/(N+8). The difference between 480/N and 480/(N +8) is 10.

480/N - 480/(N +8) = 10

=> 48/N - 48/(N + 8) = 1

=> 48(N + 8) - 48N = N*(N + 8)

=> 48N + 384 - 48N = N^2 + 8N

=> N^2 + 8N - 384 = 0

=> N^2 + 24N - 16N - 384 = 0

=> N(N + 24) - 16(N + 24) = 0

=> (N - 16)(N + 24) = 0

=> N = 16 and N = -24

As the number of students cannot be negative, ignore N = -24.

**The number of students that turned up for the picnic is 16**