Write a program to check the password is too strong or strong or weak & also check the password is validate or not.. you can use code of c/c++ and you want ....

Edited by hadisur_rahman

3 Years
Discussion Span
Last Post by Lutina

strong means hard password..that means the code output shows that the given password is hard password and also shows the output that given password is valid...ok...##Moschops

#include <iostream>
#include <string>

int main()

  std::cout << "Enter password: " << std::endl;
  std::string input;
  std::cin >> input;

  if (input.size() < 2)
    std::cout << "Too weak";
    return 0;

  if (input.size() > 2)
    std::cout <<"Too strong";
    return 17;

  std::cout << "Password is valid" << std::endl;
  return 0xee;


Please recheck your definition of strong and weak password. If the question does not give the definition then you need to set the rules for weak and strong password yourself. Only after having this rules you will be able to do the program. When you have it, post it here, and we will be pleased to help you

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.