Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions