Advertisement
UnlimitedSupply

Bob

Jun 19th, 2022
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
  5. C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
  6. Code, Compile, Run and Debug online from anywhere in world.
  7.  
  8. *******************************************************************************/
  9. #include <iostream>
  10. using namespace std;
  11.  
  12. int BobIsX() {
  13.     int Rand = rand() % 3 + 1;
  14.     return Rand;
  15. }
  16.  
  17. void Bob() {
  18.     cout << "Bark.\n";
  19.     cout << "Bark.\n";
  20.     cout << "Bark.\n";
  21.     if (BobIsX() == 1) {
  22.        
  23.     }
  24. }
  25.  
  26. int main() {
  27.     string Name;
  28.     string Choice;
  29.     cout << "Welcome to Take Care Of Bob!\n\n";
  30.     cout << "Enter your name: ";
  31.     cin >> Name;
  32.     cout << "Hello " << Name << "!\n";
  33.     cout << "Ready to start?\n";
  34.     cin >> Choice;
  35.     if (Choice == "Y" || Choice == "y") {
  36.         Bob();
  37.     } else {
  38.         main();
  39.     }
  40. }
  41.  
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement