Short Code Java Belah Ketupat Dengan Joptionpane

Posted by LIFE TO SHARE on Saturday, September 20, 2014


package tugas;



import javax.swing.JOptionPane;;
public class belah_ketupat_joptions {
  public static void main(String[] args) {
 String input= JOptionPane.showInputDialog(null,"Masukkan Nilai Inputan");

 

      for (int a=1;a<=10;a++){
            for (int b=10;b>=a;b--)
                System.out.print(" ");
            for(int b=1;b<a;b++)
                System.out.print("* ");
            System.out.println("");
        }{
        for (int j=9;j>=1;j--){
            for (int k=10;k>=j;k--)
                System.out.print(" ");
            for (int k=1;k<j;k++)
                System.out.print("* ");
            System.out.println("");
        }
    }
    }
}

Blog, Updated at: 5:48 AM

0 comments:

Post a Comment

Powered by Blogger.

Blogger templates

Game Android Terbaik Dan Terpopuler Di Tahun 2014 1. Tower Madness HD 2. Cut the Rope HD 3. Superbrothers 4. Backstab HD 5. Real Racing 2 HD 6. Angry Birds Rio HD

Blogger news

PENTERJEMAH

Blog Archive

Followers

Search Me

RAMALAN CUACA