看上去比较简单的题目,不注意细节还真的挺有难度的 源码:
public class PoolPuzzleOne { public static void main(String[] args) { // TODO Auto-generated method stub int x = 0; while(x < 4){ System.out.PRint("a"); if (x < 1) { System.out.print(" "); } System.out.print("n"); if (x > 1) { System.out.print(" oyster"); x = x + 2; } if (x == 1) { System.out.print("noys"); } if (x < 1) { System.out.print("oise"); } System.out.println(""); x = x + 1; } }}运行结果:
新闻热点
疑难解答