#include <stdio.h>;
#include <stdlib.h>;
main(){
int key,i;
printf("请输入密码:\n");
scanf("%d",&key);
if(key==123)
printf("welcome to use the software!\n");
else{
printf("请输入密码:");
scanf("%d",&key);
if(key==123)
printf("welcome to use the software!\n");
else{
printf("请输入密码:");
scanf("%d",&key);
if(key==123)
printf("welcome to use the software!\n");
else printf("password error!you can not use software!\n");
}
}
system("pause");
}
这是最笨的方法,它可用循环实现,你自己想想去做
温馨提示:答案为网友推荐,仅供参考