Selling Sandwiches
Chef sells sandwiches for a living. Each sandwich is sold for $A$ rupees. Chef also needs to buy the ingredients to make a sandwich. The sandwich buns cost $B$ rupees, and the vegetables cost $C$ rupees. Let us assume that there are no other costs for Chef right now. What is the profit Chef makes in selling one sandwich? It may be possible that the answer is negative to indicate that Chef makes
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start