Question: Please write in C++ :) ZyBooks My library > CS 116: Programming in C++ home > 3.7: Detecting multiple features with branches zyBooks catalog ?
Please write in C++
:)
ZyBooks My library > CS 116: Programming in C++ home > 3.7: Detecting multiple features with branches zyBooks catalog ? Help/FA Jump to level 1 Integer variables numDonuts and cash are read from input. A donut costs 3 dollars. - If numDonuts is less than 5 , output "numDonuts requires at least 5 to purchase.". - If numDonuts is greater than or equal to 5 , then multiply numDonuts by 3. - If the product of numDonuts and 3 is less than or equal to cash, output "Donuts successfully purchased.". - Otherwise, output "Need more money to purchase all.". - If cash is greater than or equal to 3 , output "At least one item was purchased." End with a newline. Ex: If the input is 1277 , then the output is: Donuts successfully purchased. At least one item was purchased. 123456789101112#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
