Question: num _ coconuts and my _ money are read from input. A coconut costs 3 dollars.If num _ coconuts is less than 5 , then
numcoconuts and mymoney are read from input. A coconut costs dollars.If numcoconuts is less than then output 'Please purchase at least If numcoconuts is greater than or equal to then assign totalcost with the product of numcoconuts and If totalcost is less than or equal to mymoney, then output 'Successful purchase!'Otherwise, output 'Not enough money to buy all.If mymoney is greater than or equal to then output At least one item was purchased.If numcoconuts is greater than then output 'Now out of stock.'Otherwise, output 'Item still in stock.'Click here for examplesEx : If the input is:then the output is:Please purchase at least Item still in stock.Ex : If the input is:then the output is:Successful purchase!At least one item was purchased.Now out of stock.Ex : If the input is:then the output is:Not enough money to buy all.At least one item was purchased.Now out of stock.
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
