#include <iostream>
#include <random>
using namespace std;

bool is_even()
{
    random_device rd;
    mt19937 gen(rd());

    int n = gen() % 100; 
    cout << n << " is ";

    return (n % 2 == 0);
}

int main()
{
    for (int i = 0; i < 5; i++)
    {
        if (is_even())
        {
            cout << "even" << endl;
        }
        else
        {
            cout << "odd" << endl;
        }
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: