Password Generate

Password Generate


Hii there!!!
I come again with a wonderfull project , this time I have created a Password Generator
from this coding ... I can give you infinite digits of passwords or how many digits of password you want . Simply, you have to enter your choice and get your password ready⇢
// Password Generator #created by h@rsh //
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
static const char alphnum[] = "0123456789" "!@#$%^&*" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz";
int strLen= sizeof(alphnum)-1;
char GenRand()
{
return alphnum[rand()%strLen];
}
int main()
{
int x, y=0, i=0, name;
srand(time(0));
cout << "Enter the Length of Password required:" << endl;
cin>>x;
cout << x << endl;
cout << "Your Password is:";
N:
char C;
string D;
for(int z=0; z<x; z++)
{
C=GenRand();
D+=C;
if(isdigit(C))
{
y++;
}
if(C=='!' || C=='@' || C=='$'||C=='%' || C=='^' || C=='&' || C=='*' || C=='#')
{
i++;
}
}
if(x>2 && (i==0 || y==0))
{
goto N;
}
cout << D;
cout << endl << endl<< "Password generate successfully!" << "\nCreated by H@rsh";
return 0;
}
Now go and run it using the link given below....https://code.sololearn.com/czlkc8LQgsJh
Enter your choice and get your password.
Th@nk You!