Segitiga Siku-Siku

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package tugas05;

/**
*
* @author Imamuddin .A.
*/
public class SegitigaSiku2 {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int baris, kolom;
for(baris=1; baris<=5; baris++){
for(kolom=5; kolom>=baris; kolom–)
System.out.print(” “);
for(kolom=1; kolom<=baris; kolom++)
System.out.print(kolom);
System.out.println();
}
// TODO code application logic here
}

}

Tinggalkan sebuah Komentar

Belum ada komentar.

Komentar RSS Lacak Balik URI Pengenal

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.