Question 1073441
The number of cookies not sold is:
[ dollars they COULD have made / cost per cookie ] minus 
[ dollars they ACTUALLY made / cost per cookie  ]
------------------------------------------------------
The dollars they could have made was:
{{{ ( 20q )*( 2p ) }}}
The dollars they actually made was:
{{{ r }}}
The cost per cookies was:
{{{ 2p }}}
----------------------------------------
The number of cookies not sold is:
{{{ ( 20q*2p ) / ( 2p ) - r / ( 2p ) }}}
{{{ ( 20q - r ) / ( 2p ) }}}