fork download
#include 
#include 
#include 
#include 

using namespace std;

int random(unsigned limit)
{
    return rand() % limit;
}

string getRandom(string s[], unsigned size)
{
    return s[random(size)];
}

static string getWorldName(){
    string first[10] = { "Wicked", "Epic", "Blue", "Horrible", "Soft", "Lol", "Fallen", "Wild", "Calm", "Fierce" };
    string second[9] = { "Corn", "Horse", "Man", "Cheese", "Forest", "Shade", "Box", "Waterwheel", "Village" };
    string third[3] = { "Mountains", "Fields", "Shores" };

    string world_name = getRandom(first, 10) + " " + getRandom(second, 9) + " " + getRandom(third, 3);
    return world_name;
}

int main()
{
    std::srand(time(0));

    for (unsigned i = 0; i < 10; ++i)
        std::cout << getWorldName() << '\n';
}
Success #stdin #stdout 0s 3476KB
stdin
Standard input is empty
stdout
Epic Forest Mountains
Calm Box Shores
Soft Forest Fields
Lol Man Shores
Soft Forest Mountains
Fallen Cheese Fields
Lol Horse Fields
Blue Horse Shores
Soft Cheese Mountains
Fallen Forest Shores