package com.company;
import java.util.Scanner;
public class demo02 {
public static void main(String[] args){
String answer;
Scanner input =new Scanner(System.in);
System.out.print("合格了吗? (y/n:)");
answer = input.next();
while (!"y".equals(answer)){
System.out.println("上午阅读材料");
System.out.println("下午上机编程");
System.out.print("合格了吗? (y/n):");
answer = input.next();
}
System.out.println("完成学习任务");
}
}