Question: C programming write code for: Integers numSodas and allowance are read from input. A soda costs 5 dollars. If numSodas is less than 3 ,
C programming write code for:
Integers numSodas and allowance are read from input. A soda costs dollars.
If numSodas is less than then output "Please purchase at least
If numSodas is greater than or equal to then assign variable totalCost with the product of numSodas and
If totalCost is less than or equal to allowance, then output "Successful purchase!"
Otherwise, output "Need more money to purchase all."
If numSodas is greater than then output "Restocking soon."
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
