Question: num _ pears and my _ money are read from input. A pear costs 3 dollars. If num _ pears is less than 3 ,
numpears and mymoney are read from input. A pear costs dollars.
If numpears is less than then output 'numpears requires at least to purchase.
If numpears is greater than or equal to then assign totalcost with the product of numpears and
If totalcost is less than or equal to mymoney, then output 'Successful purchase!
Otherwise, output 'Need more money to purchase all.
If numpears 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
