[C/C++] Simple Password Generator
This is a very simple and random password generator code I wrote a long time ago.
As I said, very simple.
Code:
#include <iostream>
#include <cstdlib>
using namespace std;
int main(){
int num;
int i=1;
srand(time(NULL));
char char_arr[64]={"zAyBxCwDvEuF***HrIqKpLoMnNmOlPkQjRiShTgUfVeWdXcYbZa1928374560!-"};
while (i==1){
cout << "How many characters? ";
cin >> num;
cout << "\nRandom password: ";
for (int i=0; i<num; i++)
cout << char_arr[rand() % 63];
cout << "\n\n";
cout << "Again? (0 to quit)";
cin >> i;
cout << "\n\n";
}
return 0;
}



