Here's the code in either C or C#:
return ( (price > 100) ? 10 : 5);
Computer languages are for people. It should really be more like this:
#
# Description of what this does.
#
PRICE-THRESHOLD = 100
LOWER-PRICE = 5
UPPER-PRICE = 10
IF PRICE > PRICE-THRESHOLD RETURN UPPER-PRICE
ELSE RETURN LOWER-PRICE
Alternatively, use Excel: =IF( (price > 100), 10, 5 )
Excel is cryptic, but a lot of finance people understand it.