A password maker...
| Dillyto666 (8) | |||
| Hi, Its Dilyan again. Now I want to make a simple console program wich makes complex passwords. I have an Idea how It will work, but don't know how to write it down. The user first must input his name or a word and then the PC must put a random number after the first 3 letters (from 0 to 49), then he must take the last 2 letters and then replace them with a random letter (from B to W). After that he must replace the middle 1 letter with a random number (23 to 78). After that he must type the created character string on the screen. This is how the program must act. Thanks for reading. | |||
| Duoas (1458) | |||
| Use a std::string. It has useful stuff for doing stuff like inserting and replacing letters. http://www.cplusplus.com/reference/string/string/ Use the rand() functions in <cstdlib> to get random numbers and std::stringstream to convert them to a number.
Have fun! | |||
| Dillyto666 (8) | |||
| Thats realy nice Duoas! Your program works, and I looked at the STRING tutorials you gave me the link for, I sellected the Insert operator, but I didn't saw a command which puts random nums or letters in the half of the inputted from the user string. But any way you helped me alot. Thanks. | |||
This topic is archived - New replies not allowed.
