个人信息管理系统源代码(只有Mac能用,win的用户放弃吧)
#include<iostream>
#include<cstdio>
#include<ctime>
#include<unistd.h>
#include<string>
using namespace std;
int e,c,r,y,z=123;
int id;
char ii;
const int E = e;
const int R = 291028;
string name;
string sex;
int d1,d2,d3;
void outmy()
{
cout<<"姓名:"<<name<<endl;
cout<<"性别:"<<sex<<endl;
cout<<"有效身份ID"<<id<<endl;
cout<<"出生日期:"<<d1<<' '<<d2<<' '<<d3<<endl;
return;
}
void out()
{
printf("%s","1,设定密码
");
printf("%s","2,输入个人信息
");
printf("%s","3,修改个人信息
");
printf("%s","4,显示个人信息
");
return;
}
void my()
{
cout<<"请输入姓名:";
cin>>name;
cout<<"请输入性别(拼音,例:nan):";
cin>>sex;
cout<<"请输入有效身份ID:";
cin>>id;
cout<<"请输入出生日期(例:1998 3 27):";
cin>>d1 >>d2 >>d3;
cout<<"完成[y/n]:";
cin>>ii;
return;
}
int main()
{
int v;
cout<<"加载中…."<<endl;
sleep(3);
system("clear");
out();
cout<<">>";
cin>>y;
switch(y)
{
case 1:
cout<<"请输入出厂密匙:";
cin>>r;
if(r==R)
{
cout<<"请输入您要设置的密码:";
cin >> e;
cout<<"密码设置成功"<<endl;
}
else
{
cout<<"请再试一次:";
cin>>e;
if(r==R)
{
cout<<"请输入您要设置的密码:";
cin >> e;
cout<<"密码设置成功"<<endl;
}
}
system("clear");
out();
main();
break;
case 2:
my();
if(ii=='y')
{
cout<<"设置成功!!!"<<endl;
system("clear");
main();
}
if(ii=='n')
{
cout<<"请重设…
";
sleep(3);
system("clear");
my();
}
system("clear");
out();
break;
case 3:
cout<<"请输入密码:";
cin>>c;
if(c==E)
{
my();
cout<<"设置成功"<<endl;
sleep(10);
system("clear");
out();
}
else
{
cout<<"请再试一次:";
cin>>c;
if(c==E)
{
my();
cout<<"设置成功!"<<endl;
sleep(10);
system("clear");
out();
}
else
{
cout<<"退出中…"<<endl;
sleep(3);
while(1)
{
system("clear");
}
}
}
system("clear");
out();
break;
case 4:
cout<<"请输入密码:";
cin >> c;
if(c==E)
{
outmy();
cout<<endl;
cout<<"按任意键返回菜单:";
cin>>v;
(v==1)?system("clear"):system("clear");
out();
}
else
{
cout<<"请再试一次:";
cin>>c;
if(c==E)
{
outmy();
cout<<endl;
cout<<"按任意键返回菜单:";
(v==1)?system("clear"):system("clear");
out();
}
else
{
cout<<"退出中"<<endl;
while(1)
{
system("clear");
}
}
}
system("clear");
out();
break;
}
return 0;
}
2024最新激活全家桶教程,稳定运行到2099年,请移步至置顶文章:https://sigusoft.com/99576.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。 文章由激活谷谷主-小谷整理,转载请注明出处:https://sigusoft.com/11443.html