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 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
If you add the following to the query grid in an access query, what is it called? salestaxamt: [salestaxrate]*[totalsale] formula calculated field total calculation
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
What are the benefits to using presentations to organize and deliver information in the workplace? they add visual appeal. they are easy to update. they ensure accuracy. they can be created quickly. the work can't be lost.
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
Physics, 12.04.2020 02:19
question
Mathematics, 12.04.2020 02:22
question
Mathematics, 12.04.2020 02:23
Questions on the website: 13722367