mardi 22 mars 2022

Would there be a way to generate a random string of “n” letters from the main method?

I am trying to have the string be randomly generated and used in a for loop.
When I try, I can’t seem to get it to even generate be a string with “n” letters.

I tried to add together multiple chars to create a string, but, from the for loop, all of the chars are the same. (I tried using chars because I will be doing a project with them and I need experience.) I have resorted to using strings and I need help finding out how to do the random generation.




Aucun commentaire:

Enregistrer un commentaire