annie bakes some cupcakes for her children. If she gives each child 8 cupcakes,she will have 2 cupcakes left.If she gives each child 9 cupcakes, she will need another 2 cupcakes. How many children does annie have?

8-2= 6
6 divide 2= 3
9-2= 8
8 x 3= 24

24 children.