Returns true if it is possible to get ratio r from given cost and quantity ranges .
function isRatioPossible ( lowCost , upCost , lowQuant , upQuant , r ) { for ( let i = lowQuant ; i <= upQuant ; i ++ ) {