/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package program;
/**
*
* @author Administrator
*/
public class Piramida166 {
public static void main(String[] args) {
String st = BacaKeyboard166.bacaString();
int tinggi = Integer.valueOf(st).intValue();
int baris,kolom;
for(baris=1; baris<=tinggi; baris++){
for(kolom=1; kolom<=tinggi-baris; kolom++)
System.out.print(" ");
for(kolom=1; kolom<=2*baris;kolom++)
System.out.print(" ");
System.out.println("");
}
}
}
0 komentar:
Post a Comment