Advertisement
Guest User

Untitled

a guest
May 10th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. void sredniaWieku(Osoba *baza, unsigned int rozmiarBazy) {
  2.     unsigned int suma = 0;
  3.     for(unsigned i = 0; i < rozmiarBazy; i++) {
  4.         suma += baza[i].wiek;
  5.     }
  6.     double srednia = suma/rozmiarBazy;
  7.     cout << "Srednia wieku osob w bazie danych to: " << srednia;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement