Advertisement
Guest User

RPG NAMES GENERATOR

a guest
Jan 15th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.94 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5. int main()
  6. {
  7.     srand(time(NULL));
  8.     string a[5];
  9.     string b[5];
  10.     string c[5];
  11.     string name;
  12.     string q=" ";
  13.     //fill values
  14.     a[0]="Vi";
  15.     a[1]="Lee";
  16.     a[2]="Na";
  17.     a[3]="Zaxe";
  18.     a[4]="Vu";
  19.     b[0]="nte";
  20.     b[1]="kan";
  21.     b[2]="qte";
  22.     b[3]="rda";
  23.     b[4]="ndu";
  24.     c[0]="tr";
  25.     c[1]="nd";
  26.     c[2]="lid";
  27.     c[3]="lun";
  28.     c[4]="walt";
  29.     //end of filling vals.
  30.     for(;;)
  31.     {
  32.         cout << "Your RPG name is: " << endl;
  33.         name=a[(rand()%5)]+b[(rand()%5)]+c[(rand()%5)];
  34.         cout << name << endl;
  35.         cout << "What you want to do? Write 'a' to generate other name, write anything else to close the program." << endl;
  36.         cin >> q;
  37.         if(q=="a")
  38.         {
  39.             system("cls");
  40.         }
  41.         else
  42.         {
  43.             break;
  44.         }
  45.     }
  46.     return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement