登陆系统

boypu123 boypu123 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
#include <iostream> #include <algorithm> using namespace std; int main(){ cout<<"hello ,world"<<endl; string username,username1,username2; string password,password1,password2,password3; cout<<"注册用户中"<<endl; cout<<"请输入密码(不能有字母,空格等:"; cin>>password; cout<<"请再次确认您的密码"; cin>>password2; if (password!=password2){ cout<<"您输入的密码与上一次不相符,请重新输入"; } if (password==password2){ cout<<"现在请输入您的用户名:"; cin>>username; } cout<<"注册成功了,现在让我们试着登录一下吧!"<<endl; cout<<"请输入用户名"; cin>>username1; if (username1==username){ cout<<"请输入密码"; cin>>password1; } if (password1==password){ cout<<"登录成功"; } if (password1!=password&&username!=username1){ cout<<"用户名或者密码不正确,请重新输入,或者输入1找回密码"; }else if (password1=="1"){ cout<<"找回密码中"; cout<<"请输入用户名"; cin>>username2; if (username2==username){ cout<<"现在,请输入您的新密码"; cin>>password3; cout<<"修改密码成功"<<endl; cout<<"登陆中"; cout<<"请输入用户名"; cin>>username1; if (username1==username){ cout<<"请输入密码"; cin>>password1; } if (username1!=username){ cout<<"用户名不正确"; } if (password1==password){ cout<<"登录成功"; } if (password1!=password){ cout<<"您输入的密码有误,请重新输入,由于您刚刚尝试找回密码,找回密码不可用"; } } } return 0; }
...全文
评论
收藏 已收藏
分享
返回顶部
boypu123
C++ Builder 13,871 成员 102,696 内容