Let the total number of students be 100
Then, as per the question 70% of boys = 70
Number of girls = 30
Now, total number of students when the number of girls is 30 = 100
Then, total number of students when the number of girls is 504 = (100/30) × 504
= 1680
Total number of boys = 1680 – 504
= 1176
∴the number of boys in a school is 1176