This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Minggu, 13 November 2011

Belah Ketupat Pada Java

Belah Ketupat Pada Java

Belat Ketupat Pada Java

Kodingan Belah Ketupat Pada Java :
public class BelahKetupat {
    public static void main(String[] args) {
        int l = 1;
        int tingkat = 10;
        int n = 10 / 2;
        for (int i = 1; i <= n; i++) {
            for (int k = n; k > i; k--) {
                System.out.print(" ");
            }
            for (int j = 1; j <= l; j++) {
                System.out.print("*");
            }
            l += 2;
            System.out.println(" ");
        }
        l -= 4;
        for (int i = (n - 1); i >= 1; i--) {
            for (int k = i; k <= (n - 1); k++) {
                System.out.print(" ");
            }
            for (int j = l; j >= 1; j--) {
                System.out.print("*");
            }
            l -= 2;
            System.out.println("");
        }
    }
}





Output :









Create By : Andreas Bistok Parningotan