Advertisement
Igorkot_yt

zadanie dodatkowe na 6, magik

Oct 27th, 2022
1,078
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.17 KB | None | 0 0
  1. #include <iostream>
  2. #include <chrono>
  3. #include <thread>
  4. using namespace std;
  5. using namespace std::this_thread;
  6. using namespace std::chrono;
  7. using std::chrono::system_clock;
  8.  
  9. void siedem() {
  10.     cout << R"(      _____
  11.     `.___,'
  12.      (___)
  13.      <   >
  14.       ) (
  15.      /`-.\
  16.     /     \
  17.    / _    _\
  18.   :,' `-.' `:
  19.   |         |
  20.   :         ;
  21.    \       /
  22.     `.___.' )" << endl;
  23.  
  24.     cout << "Udalo ci sie zrobic miksture! Gratuluje, liczba wrzuconych zebow byla podzielna przez 7, ale nie przez 13!" << endl;
  25.     for (int i = 0; i < 5; ++i) {
  26.         sleep_for(10ns);
  27.         sleep_until(system_clock::now() + 1s);
  28.         for (int j = 0; j < i; ++j) {
  29.             cout << '.';
  30.         }
  31.     }
  32.     cout << endl;
  33. }
  34. void trzy() {
  35.     cout << R"(                               ________________
  36.                          ____/ (  (    )   )  \___
  37.                         /( (  (  )   _    ))  )   )\
  38.                       ((     (   )(    )  )   (   )  )
  39.                     ((/  ( _(   )   (   _) ) (  () )  )
  40.                    ( (  ( (_)   ((    (   )  .((_ ) .  )_
  41.                   ( (  )    (      (  )    )   ) . ) (   )
  42.                  (  (   (  (   ) (  _  ( _) ).  ) . ) ) ( )
  43.                  ( (  (   ) (  )   (  ))     ) _)(   )  )  )
  44.                 ( (  ( \ ) (    (_  ( ) ( )  )   ) )  )) ( )
  45.                  (  (   (  (   (_ ( ) ( _    )  ) (  )  )   )
  46.                 ( (  ( (  (  )     (_  )  ) )  _)   ) _( ( )
  47.                  ((  (   )(    (     _    )   _) _(_ (  (_ )
  48.                   (_((__(_(__(( ( ( |  ) ) ) )_))__))_)___)
  49.                   ((__)        \\||lll|l||///          \_))
  50.                            (   /(/ (  )  ) )\   )
  51.                          (    ( ( ( | | ) ) )\   )
  52.                           (   /(| / ( )) ) ) )) )
  53.                         (     ( ((((_(|)_)))))     )
  54.                          (      ||\(|(|)|/||     )
  55.                        (        |(||(||)||||        )
  56.                          (     //|/l|||)|\\ \     )
  57.                        (/ / //  /|//||||\\  \ \  \ _)
  58. -------------------------------------------------------------------------------)" << endl;
  59.     cout << "liczba wrzuconych zebow byla podzielna przez 13" << endl;
  60.     for (int i = 0; i < 5; ++i){
  61.         sleep_for(10ns);
  62.         sleep_until(system_clock::now() + 1s);
  63.         for (int j = 0; j < i; ++j) {
  64.             cout << '.';
  65.  
  66.         }
  67.         cout << endl;    
  68.     }
  69. }
  70. void siedemitrzy() {
  71.     cout << R"(               (  .      )
  72.           )           (              )
  73.                 .  '   .   '  .  '  .
  74.        (    , )       (.   )  (   ',    )
  75.         .' ) ( . )    ,  ( ,     )   ( .
  76.      ). , ( .   (  ) ( , ')  .' (  ,    )
  77.     (_,) . ), ) _) _,')  (, ) '. )  ,. (' ))" << endl;
  78.     cout << "Wszystko stanelo w OGNIU! Wrzuciles liczbe zebow podzielna przez 7 i 13" << endl;
  79.     for (int i = 0; i < 5; ++i) {
  80.         sleep_for(10ns);
  81.         sleep_until(system_clock::now() + 1s);
  82.         for (int j = 0; j < i; ++j) {
  83.             cout << '.';
  84.  
  85.         }
  86.         cout << endl;
  87.     }
  88. }
  89. void nie() {
  90.     cout << R"(                    ____
  91.                  .'* *.'
  92.               __/_*_*(_
  93.              / _______ \
  94.             _\_)/___\(_/_
  95.            / _((\- -/))_ \
  96.            \ \())(-)(()/ /
  97.             ' \(((()))/ '
  98.            / ' \)).))/ ' \
  99.           / _ \ - | - /_  \
  100.          (   ( .;''';. .'  )
  101.          _\"__ /    )\ __"/_
  102.             \/  \   ' /  \/
  103.             .'  '...' ' )
  104.              / /  |  \ \
  105.             / .   .   . \
  106.            /   .     .   \
  107.           /   /   |   \   \
  108.         .'   /    b    '.  '.
  109.      _.-'    /     Bb     '-. '-._
  110. _.-'       |      BBb       '-.  '-.
  111. (________mrf\____.dBBBb.________)____))" << endl;
  112.    cout << "Nic sie nie stalo. Po prostu ci nie wyszlo." << endl;
  113.    for (int i = 0; i < 5; ++i) {
  114.        sleep_for(10ns);
  115.        sleep_until(system_clock::now() + 1s);
  116.        for (int j = 0; j < i; ++j) {
  117.            cout << '.';
  118.  
  119.        }
  120.        cout << endl;
  121.    }
  122. }
  123. void malo() {
  124.    cout << R"(  _____________________________________________________________________
  125.  |.============[_F_E_D_E_R_A_L___R_E_S_E_R_V_E___N_O_T_E_]============.|
  126.  ||%&%&%&%_    _        _ _ _   _ _  _ _ _     _       _    _ %&%&%&%&||
  127.  ||%&%&%&/||_||_ | ||\||||_| \ (_ ||\||_(_  /\|_ |\|V||_|)|/ |\ \%&%&%||
  128.  ||&%.--.}|| ||_ \_/| ||||_|_/ ,_)|||||_,_) \/|  ||| ||_|\|\_||{.--.%&||
  129.  ||%/__ _\                ,-----,-'____'-,-----,               /__ _\ ||
  130.  ||||_ / \|              [    .-;"`___ `";-.    ]             ||_ / \|||
  131.  |||  \| || """""""""" 1  `).'.'.'`_ _'.  '.'.(` A 76355942 J |  \| ||||
  132.  |||,_/\_/|                //  / .'    '\    \\               |,_/\_/|||
  133.  ||%\    /   d8888b       //  | /   _  _ |    \\      .-"""-.  \    /%||
  134.  ||&%&--'   8P |) Y8     ||   //;   a \a \     ||    //A`Y A\\  '--'%&||
  135. ||%&%&|    8b |) d8     ||   \\ '.   _> .|    ||    ||.-'-.||   |&%&%||
  136. ||%&%&|     Y8888P      ||    `|  `-'_ ` |    ||    \\_/~\_//   |&%&%||
  137.  ||%%%%|                 ||     ;'.  ' ` /     ||     '-...-'    |%&%&||
  138.  ||%&%&|  A 76355942 J  /;\  _.-'. `-..'`>-._  /;\               |%&%&||
  139.  ||&%.--.              (,  ':     \; >-'`    ;` ,)              .--.%&||
  140.  ||%( 50 ) 1  """""""  _( \  ;...---""---...; / )_```"""""""1  ( 50 )%||
  141.  ||&%'--'============\`----------,----------------`/============'--'%&||
  142.  ||%&JGS&%&%&%&%&&%&%&) F I F T Y   D O L L A R S (%&%&%&%&%&%&&%&%&%&||
  143.  '"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""`)";
  144.    cout << "masz za malo zebow i teraz musisz wydac pieniadze zeby je kupic" << endl;
  145. }
  146. int main() {
  147.    cout << R"(                  .
  148.  
  149.                   .
  150.         /^\     .
  151.    /\   "V"
  152.   /__\   I      O  o
  153.  //..\\  I     .
  154.  \].`[/  I
  155.  /l\/j\  (]    .  O
  156. /. ~~ ,\/I          .
  157. \\L__j^\/I       o
  158.  \/--v}  I     o   .
  159.  |    |  I   _________
  160.  |    |  I c(`       ')o
  161.   |    l  I   \.     ,/
  162. _/j  L l\_!  _//^---^\\_    )" << endl;
  163.     int zeby, limit, reszta7, reszta13;
  164.     cout << "Podaj ile masz zebow..." << endl;
  165.     cin >> limit;
  166.     cout << "Podaj ile wrzuciles zebow" << endl;
  167.     cin >> zeby;
  168.     cout << "Dobrze, zaczynam oblicznia" << endl;
  169.     // Providing a seed value
  170.     srand((unsigned)time(NULL));
  171.     for (int i = 0; i < 5; i++) {
  172.         int random2 = (rand() % 100000001);
  173.  
  174.         // Print the random number
  175.         cout << random2 << endl;
  176.         sleep_for(10ns);
  177.         sleep_until(system_clock::now() + 1s);
  178.     }
  179.     if (zeby > limit) {
  180.         malo();
  181.         sleep_for(10ns);
  182.         sleep_until(system_clock::now() + 10s);
  183.         return 0;
  184.     }
  185.     reszta7 = zeby % 7;
  186.     reszta13 = zeby % 13;
  187.     if (reszta7 == 0 && reszta13 == 0) {
  188.         siedemitrzy();
  189.         sleep_for(10ns);
  190.         sleep_until(system_clock::now() + 10s);
  191.         return 0;
  192.     }
  193.     if (reszta13 == 0) {
  194.         trzy();
  195.         sleep_for(10ns);
  196.         sleep_until(system_clock::now() + 10s);
  197.         return 0;
  198.     }
  199.     if (reszta7 == 0) {
  200.         siedem();
  201.     }
  202.     if (reszta7 != 0 && reszta13 != 0) {
  203.         nie();
  204.     }
  205.     sleep_for(10ns);
  206.     sleep_until(system_clock::now() + 10s);
  207.     return 0;
  208.  
  209. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement