Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ language Integer variables numNectarines and myMoney are read from input. A nectarine costs 2 dollars. If numNectarines is less than 6 , output numiNectarines

C++ language image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

Why do you think this is so? LO.1

Answered: 1 week ago

Question

Explain how HR serves as a strategic business partner.

Answered: 1 week ago

Question

Describe a social audit.

Answered: 1 week ago

Question

Describe ethics training.

Answered: 1 week ago