import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int score = scanner.nextInt();
String result = score < 60 ? "不及格" : "通过了考试";
System.out.println(result);
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int score = scanner.nextInt();
if (score >= 90) {
System.out.println("优秀");
} else if (score >= 80) {
System.out.println("优良");
} else if (score >= 60) {
System.out.println("中等");
} else {
System.out.println("不及格");
}
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String signal = scanner.next();
switch (signal) {
case "红":
// 根据路况情况,选择执行stop或go
System.out.print("有交警吗?(输入y/n)");
String police = scanner.next();
switch (police) {
case "y":
System.out.println("stop");
break;
case "n":
System.out.println("go");
break;
default:
System.out.println("call police");
break;
}
break;
case "绿":
System.out.println("go");
break;
case "黄":
System.out.println("wait");
break;
default:
System.out.println("call police");
break;
}
}
}
public class Main {
public static void main(String[] args) {
for (int i = 1; i <= 100; i++) {
if (i % 5 == 0 && i % 6 == 0) {
System.out.println(i);
}
}
}
}
public class Main {
public static void main(String[] args) {
for (int i = 1; i <= 9; i++) { // 外层循环控制行数
for (int j = 1; j <= i; j++) { // 内层循环控制每行的列数
System.out.print(j + "*" + i + " = " + (i * j) + " "); // 输出乘法表达式和结果
}
System.out.println(); // 每输出一行后,换行
}
}
}