package com.han.struct;
import java.util.Scanner;
public class Demo11 {
public static void main(String[] args) {
int chance=3;
Scanner scanner = new Scanner(System.in);
for (int i = 1; i <=3 ; i++) {
System.out.println("请输入有户名");
String s1 =scanner.nextLine();
System.out.println("请输入密码");
int s2 = scanner.nextInt();
if (s1.equals("丁真")&&s2==666){
System.out.println("登陆成功");
break;
}
chance--;
System.out.println("你还有"+chance+"次机会");
}
}
}