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, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 3
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
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
Medicine, 13.09.2019 22:20