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

string generatePassword(int length) {
    const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    string password = "";
    for (int i = 0; i < length; i++) {
        password += chars[rand() % chars.size()];
    }
    return password;
}

int main() {
    srand(time(0)); // تهيئة العشوائية

    const int passwordLength = 12;

    while (true) {
        string pass = generatePassword(passwordLength);
        cout << pass << 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: