package demo2;
import java.util.Scanner;
import demo1.ifcaipiao;
public class denglu {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
for(int i=0;i<3;i++){
System.out.println("请输入用户名:");
String name=input.next();
System.out.println("请输入密码:");
String mm=input.next();
if(("lily".equals(name))&&("111111".equals(mm))){
System.out.println("登陆成功");
System.out.println("欢迎登陆MyShoping系统!");
break;
}else{
System.out.println("输入错误!您还有"+(2-i)+"次机会");
}if(i==2){
System.out.println("对不起,您3次均输入错误!");
}
}
}
}