登陆系统

boypu123 2019-08-02 05:14:32
#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; }
...全文
61 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

13,871

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧