Minggu, 24 Juni 2012
SOURCE CODE BINTANG 1
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uts;
/**
*
* @author Masiti
*/
public class SOAL_3 {
public static void main(String[] args) {
for(int i=1;i<=5;i++){
for(int j=1;j<=6-i;j++){
System.out.print("*");
}
for(int k=1;k<=i;k++){
System.out.print(" ");
}
for(int l=1;l<=i;l++){
System.out.print("*");
}
System.out.println(" ");
}
}}
outputnya:
run:
***** *
**** **
*** ***
** ****
* *****
BUILD SUCCESSFUL (total time: 1 second)
Langganan:
Posting Komentar (Atom)
wah mksh sdh dikasih source code bntang ,,
BalasHapushehe.. iya sama2..
BalasHapus