Facebook
From Blush Octupus, 5 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 235
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. struct chatka
  8. {
  9.     string adres;
  10.     int powierzchnia;
  11.     int pietra;
  12.     int pokoje;
  13.     int dzialka;
  14.  
  15.     string przeznaczenie;
  16. };
  17.  
  18. void przypisz()
  19. {
  20.     struct chatka ok;
  21.     int i;
  22.     cout<<"1.Dom"<<endl<<"2.Mieszkanie"<<endl<<"3.Lokal"<<endl;
  23.     cout<<"Wybierz numer:"<<endl;
  24.     cin>>i;
  25.  
  26.  
  27.  
  28.     if(i==1)
  29.          {
  30.              system("CLS");
  31.              cout<<"Wybrales dom!"<<endl;
  32.              cout<<"Podaj liczbe pieter:"<<endl;
  33.              cin>>ok.pietra;
  34.              cout<<"Podaj liczbe pokoi:"<<endl;
  35.              cin>>ok.pokoje;
  36.              cout<<"Podaj wielkosc dzialki w arach:"<<endl;
  37.              cin>>ok.dzialka;
  38.              cout<<"Szukanie oferty!!!!"<<endl;
  39.              cout<<ok.pietra<<" pieter/tra,"<<ok.pokoje<<" pokoje/i,"<<ok.dzialka<<" ary/ow."<<endl;
  40.              Sleep(3000);
  41.              system("CLS");
  42.              cout<<"Brak ofert!"<<endl;
  43.  
  44.          }
  45.          if(i==2)
  46.          {
  47.              system("CLS");
  48.              cout<<"Wybrales mieszkanie!"<<endl;
  49.              cout<<"Podaj liczbe pokoi:"<<endl;
  50.              cin>>ok.pokoje;
  51.              cout<<"Szukanie oferty!!!!"<<endl;
  52.              cout<<ok.pokoje<<" pokoje/i."<<endl;
  53.              Sleep(3000);
  54.              system("CLS");
  55.              cout<<"Brak ofert!"<<endl;
  56.  
  57.          }
  58.  
  59.           if(i==3)
  60.          {
  61.              system("CLS");
  62.              cout<<"Wybrales lokal!"<<endl;
  63.              cout<<"Podaj jego przeznaczenie:"<<endl;
  64.              cin>>ok.przeznaczenie;
  65.              cout<<"Szukanie oferty!!!!"<<endl;
  66.              cout<<"Przeznaczenie lokalu:"; cout<<ok.przeznaczenie;
  67.              Sleep(3000);
  68.              system("CLS");
  69.              cout<<"Brak ofert!"<<endl;
  70.  
  71.          }
  72.  
  73.  
  74. }
  75.  
  76.  
  77. int main()
  78. {
  79.     przypisz();
  80.     return 0;
  81. }
  82.