为给定数字生成金字塔
import java.io.BufferedReader; import java.io.InputStreamReader; //时代Java公众号 - N o w J a v a . c o m 提供 public class Main { public static void main (String[] args) throws Exception{ BufferedReader keyboard = new BufferedReader (new InputStreamReader (System.in)); System.out.println("Enter Number:"); int as= Integer.parseInt (keyboard.readLine()); System.out.println("Enter X:"); int x= Integer.parseInt (keyboard.readLine()); //来自 N o w J a v a . c o m int y = 0; for(int i=0; i<= as ;i++){ for(int j=1; j <= i ; j++){ System.out.p