Question: code needs to be fixed C++ 1 #include 2 using namespace std; 3 int main() 4 { 5 // Declare and initialize variables 6 int

 code needs to be fixed C++ 1 #include 2 using namespace
code needs to be fixed C++

1 #include 2 using namespace std; 3 int main() 4 { 5 // Declare and initialize variables 6 int InputValue = 0; 7 int TotalValue 0; 8 int CountValue = 0; 9 10 // Read input value 11 cout > InputValue; 13 14 // While loop to total up the daily sales 15 while (InputValue != -1) 16 { 17 // Update total and count (FIX) 18 19 // Read input value 20 cout > InputValue; 22 } 12 23 24 25 26 27 28 } // Calculate and print average value (FIX) int AverageValue = 0; cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!