Problem: john paid a sum of money for purchasing 20 pens , which he recovered in full when he sold 10 of them . what was his percentage of profit or loss per pen ?
Rationale: a 100 % if the sum he paid whilst purchasing 20 pens = a , then the cost price of each pen = a / 20 . since the amount he got whilst selling 10 pens is also = a then the selling price of each pen = a / 10 . since selling price > cost price , he made a profit . profit per pen = selling price - cost price = a / 10 - a / 20 = a / 20 . profit percentage per pen = profit per pen / cost per pen x 100 = ( a / 20 ) / ( a / 20 ) x 100 = 100 %
annotated_formula: multiply(divide(subtract(20, 10), 10), const_100)