Created
February 12, 2021 10:07
-
-
Save paintedpotato/8f08c3f783e06d6772e6c5950d11244e to your computer and use it in GitHub Desktop.
Random Responses - based on question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<cstdlib> | |
#include<string> | |
using namespace std; | |
string rRandom(int x){ | |
string name; | |
switch(x){ | |
case 0: | |
name = "don't"; | |
return name; | |
break; | |
case 1: | |
name = "do"; | |
return name; | |
break; | |
case 2: | |
name = "bye"; | |
return name; | |
break; | |
} | |
} | |
main(){ | |
int i; | |
string name; | |
int x = rand() % 2; | |
string qn1 = "hey, how are you?"; | |
cout<<qn1<<endl; | |
name = rRandom(x); | |
cout<<name<<endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment