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 04:40
The narrative structure of the popular movies can be broken down into
Answers: 3
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
Think of a spreadsheet as a giant calculator spread of paper chart data collector
Answers: 2
You know the right answer?
During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer...
Questions
question
Health, 08.11.2020 14:00
question
Advanced Placement (AP), 08.11.2020 14:00
question
Mathematics, 08.11.2020 14:00
question
Biology, 08.11.2020 14:00
question
Social Studies, 08.11.2020 14:00
Questions on the website: 13722367