Instructions 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...

1 answer below »


Instructions


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




Instructions 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 Tasks 0.00 out of 10.00 Correct output for test cases 3 0 out of 3 checks passed. Review the results below for more details. Checks Test CaseIncomplete 2 vegetables test 1 Input 100 2 1 1 1 1 1 1 1 2 1 2 1 Output Results 100.0 -498.0 Show Details Test CaseIncomplete 1 vegetable test 1 Input 200 1 3 2 4 24 39 Output Results 7800.0 1200.0 Show Details Test CaseIncomplete 2 vegetables test 2 Input 150 2 40 2 3 5 30 36 0.5 2 5 29 40 Output Results 5760.0 75.0 Show Details This is the cover of the book it is from:
Answered Same DayOct 30, 2021

Answer To: Instructions Ron bought several acres of farm to grow and sell vegetables. Suppose that Ron wants...

Sathishkumar answered on Oct 31 2021
124 Votes
#include
#include
using namespace std;
int main ()
{
double area,n,p1,p2
;
double sc1,pc1,fc1,lc1,sp1;
double sc2,pc2,fc2,lc2,sp2;
std::cout << std::fixed;
std::cout << std::setprecision(1);
cout << "1.Enter the total farm area in acres: \n";
cin >> area;
cout << "2.The number of vegetables (one or two) that the user wants to grow:\n";
cin >> n;
if(n==1)
{
    cout << "4.Enter the seed cost, plantation cost, fertilizing cost,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here