
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;

string get_random_name(string arr[], int& nums)
{
    int num = rand() % nums;
    string name = arr[num];
    arr[num] = arr[nums - 1];
    --nums;
    return name;


}

int main()
{
    srand(time(NULL));
    string num_names[6];
    int num_of_names;
    int N = 6;

    cout << "== Who Should I Text? ==" << endl;
    cout << "Enter seed" << endl;
    cin >> num_of_names;

    for (int counter = 0; counter < num_of_names; counter++)
    {
        cout << "Enter friend " << counter << endl;
        cin >> num_names[counter];
    }


    cout << "You should text: " << get_random_name(num_names, num_of_names) << endl;

    cout << "These other friends didn't make the cut:" << endl;

    for (int i = 0; i < num_of_names; ++i)
    {
        cout << num_names[i] << endl;
    }
    return 0;

}