Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main()
- {
- srand(time(NULL));
- string a[5];
- string b[5];
- string c[5];
- string name;
- string q=" ";
- //fill values
- a[0]="Vi";
- a[1]="Lee";
- a[2]="Na";
- a[3]="Zaxe";
- a[4]="Vu";
- b[0]="nte";
- b[1]="kan";
- b[2]="qte";
- b[3]="rda";
- b[4]="ndu";
- c[0]="tr";
- c[1]="nd";
- c[2]="lid";
- c[3]="lun";
- c[4]="walt";
- //end of filling vals.
- for(;;)
- {
- cout << "Your RPG name is: " << endl;
- name=a[(rand()%5)]+b[(rand()%5)]+c[(rand()%5)];
- cout << name << endl;
- cout << "What you want to do? Write 'a' to generate other name, write anything else to close the program." << endl;
- cin >> q;
- if(q=="a")
- {
- system("cls");
- }
- else
- {
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement