Let the number of boys in the class = x
Then number of girls in the class = 60 – x [∵ total students = 60]
Money contributed by the boys = x(60 – x) = 60x – x2 [∵ given]
Money contributed by the girls = (60 – x)x = 60x – x2
∴ Money contributed by the class = 120x – 2x2
By problem 120x -2x2 = 1600
⇒ 2x2 – 120x + 1600 = 0
⇒ x2 – 60x + 800 = 0
⇒ x2 – 40x – 20x + 800 = 0
⇒ x(x – 40) – 20 (x – 40) = 0
⇒ (x – 40) (x – 20) = 0
⇒ x = 40 (or) 20
∴ Boys = 40 or 20 Girls = 20 or 40.