Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ please Integer variables numLemons and myMoney are read from input A lemon costs 2 dollars. - If numLemons is less than 4 ,
In C++ please
Integer variables numLemons and myMoney are read from input A lemon costs 2 dollars. - If numLemons is less than 4 , output "numLemons requires at least 4 to purchase." - If numlemons is greater than or equal to 4 , then multiply numLemons by 2. - If the product of numLemons and 2 is less than or equal to myMoney, output "Lemons successfully purchased". - Otherwise, output Not all lemons purchased. - If myMoney is greater than or equal to 2, output 'At least one item was purchased." - If numlemons is greater than 23, output "Now out of stock: . Otherwise, output "Item still in stock". End with a newline. Ex If the input is 1742 , then the output is Lemons successfully purchased. At least one item was purchased. Item still in stock Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started