application1.java~3~

来自「提供了常用的JAVA技术的示例」· JAVA~3~ 代码 · 共 61 行

JAVA~3~
61
字号
package numgame;import javax.swing.UIManager;import java.awt.*;import java.io.*;//报数游戏:A B C D E F G H 共八人占成一排,从A开始蛇行报数,谁先报到18678902 ?public class Application1 {  //Main method  public static void main(String[] args) throws IOException {    final long num=52;    int   n=(int)(num%14);    switch(n){      case 1:        System.out.println("the person is A .");        break;      case 2:        System.out.println("the person is B .");        break;      case 3:        System.out.println("the person is C .");        break;      case 4:        System.out.println("the person is D .");        break;      case 5:        System.out.println("the person is E .");        break;      case 6:        System.out.println("the person is F .");        break;      case 7:        System.out.println("the person is G .");        break;      case 8:        System.out.println("the person is H .");        break;      case 9:        System.out.println("the person is G .");        break;      case 10:        System.out.println("the person is F .");        break;      case 11:        System.out.println("the person is E .");        break;      case 12:        System.out.println("the person is D .");        break;      case 13:        System.out.println("the person is C .");        break;      case 14:        System.out.println("the person is B .");        break;    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?