Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sredniaWieku(Osoba *baza, unsigned int rozmiarBazy) {
- unsigned int suma = 0;
- for(unsigned i = 0; i < rozmiarBazy; i++) {
- suma += baza[i].wiek;
- }
- double srednia = suma/rozmiarBazy;
- cout << "Srednia wieku osob w bazie danych to: " << srednia;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement