Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

I need help solving this C++ homework. Ron bought several acres of farm to grow and sell vegetables. Suppose that Ron wants to grow a

I need help solving this C++ homework.

Ron bought several acres of farm to grow and sell vegetables. Suppose that Ron wants to grow a maximum of two types of vegetables. Write a program that prompts Ron or the user to do the following:

1. Enter the total farm area in acres.

2. The number of vegetables (one or two) that the user wants to grow.

3. If the user wants to grow two types of vegetables, then prompt the user to enter the portion (as a percentage) of land used for the first vegetable.

4. Enter the seed cost, plantation cost, fertilizing cost, labor cost, and selling price per acre.

5. If the user specified 2 vegetables, prompt the user to enter the items in step 4 for the second vegetable.

The program then outputs -

1. The total revenue.

2. The profit/loss.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions