SHARE
TWEET

Untitled

a guest Jan 21st, 2020 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     float suma = 0;
  2.     float ilosc = 0;
  3.  
  4.     for (int liczba : liczby)
  5.     {
  6.         if (liczba >= -5 && liczba <= 6)
  7.         {
  8.             suma += liczba;
  9.             ilosc++;
  10.         }
  11.     }
  12.  
  13.     float srednia = suma / ilosc;
  14.  
  15.     std::cout << "Średnia arytmetyczna wynosi: " << srednia << std::endl;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top