// This program illustrates a count controlled while loop. // Write a program that calculates the average of 10 integers. #include using namespace std; int main() { int value, count, sum = 0; count = 0; // initialize loop control variable cout << "Please enter 10 integers" << endl; while (count < 10) // test loop control variable { cin >> value; sum += value; count++; // modify loop control variable } cout << " The average is " << (double)sum / count << endl; }