ピラミッドを書く

public class Piramid {
	public static void main(String[] args) {
		int n = 10;
		int asta = 1;
		for(int num = 1; num <= n; num++){
			for(int i = 0 ; i < n-num; i++){
				System.out.print(" ");
			}


			for(int i = 0 ; i < asta; i++){
				System.out.print("*");
			}

			for(int i = 0 ; i < n-num; i++){
				System.out.print(" ");

			}

			System.out.print("\n");
			asta += 2;
		}
	}

}