subject

During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the users to enter the size of the fertilizer bag, in pounds, the cost of the bag and the area, in square feet, that can be covered by the bag. The program should output the desired results, the price per pound and the cost of each square foot fertilizer However, the program contains logic errors. Find and correct the logic errors so that the program works properly.

#include int main() { int bagSize; cout << "The cost of the fertilizer per pound is: $" << bagCost / bagSize << endl; cout << "The cost of the fertilizer per square foot is: $" << bagCost / bagAreaCovered << endl; cout << "Enter the amount of fertilizer, in pounds, in the bag: " << endl; cin >> bagSize; cout << "Enter the cost of the " << bagSize << " pound fertilizer bag: " << endl; cin >> bagCost; double bagCost; cout << "Enter the area, in square feet, that you want to fertilizer? " << endl; cin >> bagAreaCovered; double bagAreaCovered; cout << fixed << showpoint << setprecision(2); system("pause"); #include return 0; using namespace std; }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
What did creator markus β€œnotch" persson initially call his game
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
You know the right answer?
During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer...
Questions
question
English, 10.05.2021 23:00
question
Biology, 10.05.2021 23:00
question
Biology, 10.05.2021 23:00
question
Mathematics, 10.05.2021 23:00
Questions on the website: 13722363