import java.util.Scanner;
public class StringText_01 {
public static void main(String[] args) {
String name = "Tom";
String num = "1504635069";
for (int i = 0; i < 3; i++) {
Scanner input = new Scanner(System.in);
System.out.println("请输入你的用户名:");
String name_in = input.nextLine();
System.out.println("请输入你的密码:");
String num_in = input.nextLine();
if(name.equals(name_in)&&num.equals(num_in)){
System.out.println("登陆成功");
break;
}else{
if (2 - i == 0) {
System.out.println("您的账户已锁定,请联系管理员");
break;
}
System.out.println("请检查输入的账号密码是否有误,您还有"+(2-i)+"次机会");
}
}
}
}