Commit ede55ccb authored by Karine's avatar Karine

Exercise_05_06, Verson3

parent 63a1f2fd
......@@ -4,11 +4,11 @@ int
main()
{
int sum = 0;
int count = 0;
int count;
std::cout << "Enter the numbers (9999 to exit): ";
while (true) {
for (count = 0; ; ++count) {
int number;
std::cin >> number;
......@@ -17,7 +17,6 @@ main()
}
sum += number;
++count;
}
double average = sum / count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment