Question: C++ language Integer variables numNectarines and myMoney are read from input. A nectarine costs 2 dollars. If numNectarines is less than 6 , output numiNectarines
Integer variables numNectarines and myMoney are read from input. A nectarine costs 2 dollars. If numNectarines is less than 6 , output "numiNectarines requires at least 6 to purchase" - If numNectarines is greater than or equal to 6 , then multiply numNectarines by 2 . o If the product of numNectarines and 2 is less than or equal to myMoney, output "Approved transaction. - Otherwise, output "Not enough money to buy all". End with a newline. Ex. If the input is 1771 , then the output is: Approved transaction. 1 Finclude kostreams 2 using nasespace std; int main(?) ( int numiectarines; int mylloney: cin 3> numbiectarines; cin mylborey; y your code joes here return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
