In Box E, 6 of the 30 cups were purple.
The percentage of purple cups in Box E was 306×100%=102×100%=20%.
On Monday, 30% of Daniel’s 90 cups or 30%×90=10030×90=27 cups were purple.
Daniel had 9 purple cups in Box D and 6 purple cups in Box E.
Therefore, the number of purple cups in Box F was 27−9−6=12.
Daniel had 27 purple cups and 90 cups in total.
On Tuesday, Avril added 9 more purple cups to Daniel’s cups, bringing the number of purple cups to 27+9=36, and the total number of cups to 90+9=99.
Barry brought some yellow cups and included them with the 99 cups.
Let the number of yellow cups that Barry brought be y.
The total number of cups was then 99+y, while the number of purple cups was still 36 (since Barry brought yellow cups only).
Since the percentage of cups that were purple was again 30% or 10030, then 10030 of 99+y must equal 36.
Solving, we get 10030×(99+y)=36 or 30(99+y)=3600 or 99+y=120, and so y=21.
Therefore, Barry brought 21 cups.