Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. #include <ctime>
  5.  
  6. using namespace std;
  7.  
  8. void wyrocznia(){
  9.     string pytanie;
  10.     cout<<"Zadaj zamkniete pytanie"<<endl;
  11.     getline(cin,pytanie);
  12.     bool xd;
  13.     xd=rand()%2;
  14.     if(xd==0)
  15.     cout<<"tak"<<endl;
  16.     else cout<<"nie"<<endl;
  17.    
  18. }
  19.  
  20. void ustaw_generowanie()
  21. {
  22.     srand( time( NULL ) );
  23. }
  24.  
  25. int main(){
  26.  ustaw_generowanie();
  27. wyrocznia();   
  28.     wyrocznia();
  29.     wyrocznia();
  30.     int x;
  31.     cin>>x;
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement