If there is a discrepancy between prices the consumer is entitled to receive 10 times the difference between those prices; this amount given must be at least $1 and at most $5. Also, the consumer will be given the difference between the prices, in addition to the amount calculated above.
For example: I the difference is 5¢, you should receive $1 (since 10 times the difference is only 50¢ and you are to receive at least $1), plus the difference of 5¢. Thus, the total you should receive is $1.05. If the difference is 25¢, you should receive 10 times the difference in addition to the difference, giving (10)(0.25)+0.25 = $2.75. If the difference is 95¢, you should receive $5 (because 10(0.95) = $9.50 is more than $5, the maximum penalty, plus 95¢, giving you $5.95.
need to find the formula using piece-wise functions and possible greatest integer functions