Guest User

Untitled

a guest
Nov 29th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int Data::Porownaj(const Data & wzor) const
  2. {
  3.     if (this->Rok() == wzor.Rok()) {
  4.         if (this->Miesiac() == wzor.Miesiac()) {
  5.             if (this->Dzien() == wzor.Dzien()) {
  6.                 return 0;
  7.  
  8.             }
  9.             else if (this->Dzien() > wzor.Dzien()) {
  10.                 return -1;
  11.             }
  12.             else if (this->Miesiac() < wzor.Miesiac()) return 1;
  13.            
  14.  
  15.         }
  16.         else if (this->Miesiac() > wzor.Miesiac()) {
  17.             return -1;
  18.         }
  19.         else if (this->Miesiac() < wzor.Miesiac()) return 1;
  20.  
  21.  
  22.     }
  23.     else if (this->Rok() > wzor.Rok()) {
  24.         return -1;
  25.     }
  26.     else if (this->Rok() < wzor.Rok()) return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment