Advertisement
adwas33

Untitled

Mar 23rd, 2021
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. int main() {
  2. folwark::Zwierze samotnik;
  3. samotnik.setMasa(500);
  4. samotnik.setNazwa("Slon");
  5. folwark::Zwierze * tab=new folwark::Zwierze [2];
  6.  
  7.  
  8.  
  9. tab[0].setNazwa("kot");
  10. tab[0].setMasa(5);
  11. cout<<"Liczba zwierzat aktualnie "<<tab[0].getLicznik()<<endl;
  12. if(samotnik.czy_ciezsze(400))
  13. {
  14. cout<<samotnik.getNazwa()<<" jest ciezszy niz 400 "<<endl;
  15. } else cout<<samotnik.getNazwa()<<" jest lzejszy niz 400 "<<endl;
  16. string ktore_dluzsze_w_tablicy=dluzsza_nazwa(&samotnik,&tab[1]);
  17. cout<<"W tablicy najdluzszym slowem jest "<<ktore_dluzsze_w_tablicy<<endl;
  18.  
  19.  
  20.  
  21.  
  22. cout<<"Aktualna ilosc zwierzat "<<samotnik.getLicznik()<<endl;
  23.  
  24. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement