So i am currently trying to create something where it randomly generates 13 letters depending on how many the user wants to generate.
Ex: User inputs they want to generate 5 codes (13 letters each)
program then generates 5 codes.
I can't seem to figure out how to set a max number of generated codes and with a limit of 13 letters each. Whenever i run the program i just get this:
https://gyazo.com/055750c49c3d3cff4fb0132a7de139e2
This is what i have so far for that, any help is appreciated!
Ex: User inputs they want to generate 5 codes (13 letters each)
program then generates 5 codes.
I can't seem to figure out how to set a max number of generated codes and with a limit of 13 letters each. Whenever i run the program i just get this:
https://gyazo.com/055750c49c3d3cff4fb0132a7de139e2
This is what i have so far for that, any help is appreciated!
Code
int amount_codes;
cout << "Enter amount of codes: ";
cin >> amount_codes;
}
cout << "You have chosen " << amount_codes << " codes to generate! (If it says 0 please input an integer). " << endl;
while (true) {
int letter, count = 0;
while (count < 100)
{
letter = rand() % 26; //0, 1, 2, 3, 4, 5, 6, ....25
cout << static_cast<char>(letter + 65);
}
cout << letter;
}


![[Image: FtwuQgr.gif]](https://i.imgur.com/FtwuQgr.gif)