Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Welcome to GDB Online.
- GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
- C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
- Code, Compile, Run and Debug online from anywhere in world.
- *******************************************************************************/
- #include <iostream>
- using namespace std;
- int BobIsX() {
- int Rand = rand() % 3 + 1;
- return Rand;
- }
- void Bob() {
- cout << "Bark.\n";
- cout << "Bark.\n";
- cout << "Bark.\n";
- if (BobIsX() == 1) {
- }
- }
- int main() {
- string Name;
- string Choice;
- cout << "Welcome to Take Care Of Bob!\n\n";
- cout << "Enter your name: ";
- cin >> Name;
- cout << "Hello " << Name << "!\n";
- cout << "Ready to start?\n";
- cin >> Choice;
- if (Choice == "Y" || Choice == "y") {
- Bob();
- } else {
- main();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement