If you would like to know how many jelly beans were in the bag, you can calculate this using the following steps:
x ... the number of jelly beans in the bag
8% of x is 24 green jelly beans
8% of x = 24
8% * x = 24
8/100 * x = 24 /*100/8
x = 24 * 100 / 8
x = 300 jelly beans
Result: 300 jelly beans were in the bag.