输出以下图形(第一行前没有空格)**************** ***** **** for(int i=1; ____;i++) { for(int j=1; ____;j++) { System.out.print(" "); } for(int j=1; ____; ____) { System.out.print("*"); } ____; }
查看答案
打印下面平等四边形(第一行前4个空格,第二行前2个空格,最后一行没有空格)******* ************** for (int i = 1; ____; ____) { for (int j = 1; ____; j++) { System.out.print(" "); } for (int j = 1; ____; j++) { System.out.print("*"); } System.out.println(); }
打印200-300之间的所有素数 System.out.println("200-300之间的素数有:"); for (int num = 200; num <= 300; num++) { boolean isPrime = ____; for (int i = 2; i <= num - 1; i++) { if (num % i == 0) { isPrime = ____; break; } } if (isPrime) { System.out.print(num + " "); } }