Home > Back-end >  Log in the system
Log in the system

Time:11-11

#include
#include
using namespace std;
Int main () {
Cout<& lt;" Hello, world "& lt; String username, with username1 is, username2;
String password, password1 and password2 password3;
Cout<& lt;" Registered users "& lt; Cout<& lt;" Please enter the password (not have letters, Spaces, such as: ";
Cin> The password;
Cout<& lt;" Please confirm your password again ";
Cin> Password2;
If (password! Password2)={
Cout<& lt;" The password you entered is not consistent with what the last time, please input again."
}
If (password==password2) {
Cout<& lt;" Now, please enter your user name: ";
Cin> The username;
}
Cout<& lt;" Registration is successful, let's try to login now!" Cout<& lt;" Please enter the user name ";
Cin> With username1 is;
If (with username1 is==username) {
Cout<& lt;" Please enter the password ";
Cin> Password1.
}
If (password1==password) {
Cout<& lt;" Login successful ";
}
If (password1!=password& & The username!=with username1 is) {
Cout<& lt;" The user name or password is incorrect, please enter again, or enter 1 retrieve password ";
} else if (password1=="1") {
Cout<& lt;" In the retrieve password ";
Cout<& lt;" Please enter the user name ";
Cin> Username2;
If (username2==username) {
Cout<& lt;" Now, please enter your new password ";
Cin> Password3;
Cout<& lt;" Change the password success "& lt; Cout<& lt;" "Landing;
Cout<& lt;" Please enter the user name ";
Cin> With username1 is;
If (with username1 is==username) {
Cout<& lt;" Please enter the password ";
Cin> Password1.
}
If (with username1 is!={username)
Cout<& lt;" The user name is not correct ";
}
If (password1==password) {
Cout<& lt;" Login successful ";
}
If (password1!={
the password)Cout<& lt;" The password you entered is wrong, please input again, because you just try to retrieve password, retrieve password, not with ";
}
}
}
return 0;
}
  • Related