|
#include <afx.h>
#include<shellapi.h>
#include<iostream>
using namespace std;
int main()
{
int ncount=1;
while(ncount<4){
cout<<"请输入密码"<<endl;
int npassid;
cin>>npassid;
if(npassid==8){
cout<<"密码正确"<<endl;
break;
}
ncount++;
}
if(ncount==4){
cout<<"密码错误"<<endl;
return 1;
}
int i;
cin>>i;
switch(i){
case 0: {
ShellExecute(NULL,"open","http://www.baidu.com","",NULL,SW_SHOWNORMAL);
break;
}
case 1:{
char num;
char chnew;
cin>>num;
if(num>97) chnew=num-('a'-'1');
else chnew=num+('a'-'1');
cout<<chnew<<endl;
break;
}
default:
break;
}
return 0;
} |
|