Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 3rd, 2020 134 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //vasiot kod ovde
  2. #include <iostream>
  3. #include <string.h>
  4. using namespace std;
  5. class Masa {
  6.     private:
  7.     int dolzina;
  8.     int sirina;
  9.     public:
  10.     Masa(int sirina = 0, int dolzina = 0) {
  11.         this->sirina = sirina;
  12.         this->dolzina = dolzina;
  13.     }
  14.    
  15.     void pecati() {
  16.         cout << "Masa: " << sirina << " " << dolzina << " " << endl;
  17.     }
  18. };
  19.  
  20. class Soba {
  21.     Masa masa;
  22.     int dolzina;
  23.     int sirina;
  24.     public:
  25.     Soba() {
  26.         dolzina = 0;
  27.         sirina = 0;
  28.     }
  29.     Soba(int sirina, int dolzina, Masa m) {
  30.         this->sirina = sirina;
  31.         this->dolzina = dolzina;
  32.         masa = m;
  33.     }
  34.     void pecati() {
  35.         cout << "Soba: " << sirina << " " << dolzina << " ";
  36.         masa.pecati();
  37.     }
  38. };
  39. class Kukja {
  40.     Soba soba;
  41.     char adresa[30];
  42.     public:
  43.     Kukja() {
  44.     }
  45.     Kukja(Soba s, char *adr) {
  46.         soba = s;
  47.         strcpy(adresa, adr);
  48.     }
  49.    
  50.     ~Kukja() {
  51.        
  52.     }
  53.     void pecati() {
  54.         cout << "Adresa: " << adresa << " ";
  55.         soba.pecati();
  56.     }
  57. };
  58.  
  59. //ne smee da se menuva main funkcijata!
  60. int main(){
  61.     int n;
  62.     cin>>n;
  63.     for(int i=0;i<n;i++){
  64.         int masaSirina,masaDolzina;
  65.         cin>>masaSirina;
  66.         cin>>masaDolzina;
  67.         Masa m(masaSirina,masaDolzina);
  68.         int sobaSirina,sobaDolzina;
  69.         cin>>sobaSirina;
  70.         cin>>sobaDolzina;
  71.         Soba s(sobaSirina,sobaDolzina,m);
  72.         char adresa[30];
  73.         cin>>adresa;
  74.         Kukja k(s,adresa);
  75.         k.pecati();
  76.     }
  77.    
  78.     return 0;
  79. }
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