Hey there!
I'm trying to figure out how to get a random letter generator for a program I'm working on in my computer science class (it's in C++). I need to generate 5 random capital letters between A and P (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P).
I'm not sure how to do it properly (I have no clue if I'm doing this even remotely correct) so any help would be so awesome!
Thanks!!
This is what I have so far:
for (i=0; i<5; i++){
cmptChoice [i] == rand() % ('A' - 'P');
}
cout << "computer choice: " << cmptChoice;
}