package edu.xcdq;
/*
*@author hezhipeng
*@date 2021/3/17 17:33
*/
import java.util.Scanner;
public class Demo01 {
// public static void main(String[] args) {
// System.out.print(“合格了吗 (y/n):”);
// String answer = input.next();
// while (!“y”.equals(answer)) {
//
//
//
//
// }
System.out.print(“合格了吗?(y/n):”);
String answer = input.next();
while (!“n”.equals(answer)){
public static void main(String[] args) {
System.out.print(“学习任务是否合格 (y/n):”);
Scanner scanner =new Scanner(System.in);
String shifouhege = scanner.next();
while (!shifouhege.equals("y") ) {// ==
System.out.println("上午学理论");
System.out.println("下午上机编程");
System.out.println("经过又一次学习,合格了吗?");
shifouhege = scanner.next(); //
}
System.out.println(“恭喜,合格了”);
}
}