Advertisement
Guest User

eprogramik

a guest
Nov 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <time.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     srand(time(NULL));
  9.  
  10.     cout << "1. Chrobot" << endl;
  11.     cout << "2. Kubus" << endl;
  12.     cout << "3. Bedla" << endl;
  13.     cout << "4. Wilk" << endl;
  14.     int pick;
  15.     cin >> pick;
  16.     switch(pick)
  17.     {
  18.     case 1:
  19.         while(1){
  20.                 Sleep(500);
  21.             cout << "Dziekuje ";
  22.         }
  23.             break;
  24.     case 2:
  25.         while(1){
  26.             Sleep(500);
  27.             cout << "Dzien dobry ";
  28.         }
  29.             break;
  30.     case 3:
  31.         int ocena;
  32.         ocena = rand()%11;
  33.         if(ocena == 8)
  34.             cout << "niezle " << ocena << " pkt" << endl;
  35.         else
  36.             cout << "Panie kolego " << ocena << " pkt" << endl;
  37.         break;
  38.     case 4:
  39.         string imie;
  40.         cout << "Podaj imie: ";
  41.         cin >> imie;
  42.         if(imie == "jewheni")
  43.             cout << "panie eugeniuszu" << endl;
  44.         else
  45.             cout << "Pan " << imie << endl;
  46.         cout << "Prosze podac nazwe projektu: ";
  47.         string projekt;
  48.         cin >> projekt;
  49.         cout << "e-" << projekt << endl;
  50.     }
  51.  
  52.     return 0;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement