C++ program to generate random password

IT Idiots network tricks




                                                                                                           

Strong Password Suggester Program

                                           Program to produce CAPTCHA and confirm client · Create Directory or Folder with C/C++ Program · C Program to Swap two Numbers · C Program CPP source code:/Program to take care of solid secret key issue. #include<bits/stdc++.h>. utilizing namespace sexually transmitted disease; int minimumNumber(int n, string secret key) {. /Returning the base number of characters. /to make the secret word solid. int a=0,b=0,c=0,d=0; for(int i=0;i<n;i++)

Strong password program in C++

                                       C Program to Check if a Given String is Palindrome · Program to print all palindromes in a given reach · C++ Program to eliminate spaces from an Output: Strength of secret word:- Strong
                                

Program coding

                       
            #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 n,c=0,s=0;
srand(time(0));
cout<<"Enter the length of the password required:";
cin>>n;
cout<<n<<endl;
cout<<"Your Password is:";
N:
char C;
string D;
for(int z=0; z < n; z++) 
C=GenRand();
D+=C;
if(isdigit(C))
{
c++;
}
if(C=='!' || C=='@' || C=='$' || C=='%' ||  C=='^' || C=='&'|| C=='*'|| C=='#')
{
s++;
}
}
if(n>2 && (s==0 || c==0))
{
goto N; 
}
cout<<D; 
return 0; 
}