#include <iostream>

using namespace std;

int main()
{  
   double sum = 0;
   int count = 0;
   double value = 0;
   cout << "Wprowadź liczby, W - wyjście:  ";
   bool done = false;
   while (!done)
   {  
      cin >> value;
      if (cin.fail())
      {
         done = true;
      }
      else 
      {  
         sum = sum + value;
         count++;
      }
   }
   if (count > 0)
   {
      double average = sum / count;
      cout << "Średnia: " << average << endl;
   }
   else
   {
      cout << "Brak danych" << endl;
   }
   return 0;
}

