Source Code :
public class Piramid5
{
public static void main (String [] args)
{
int tinggi;
System.out.print("tinggi : ");
tinggi = Integer.parseInt(System.console().readLine());
for(int i = 0; i < tinggi; i++)
{
System.out.println("");
for(int j = 0; j < i; j++)
System.out.print(" ");
for(int j = tinggi; j > i; j--)
System.out.print("*");
for(int j = tinggi - 1; j > i; j--)
System.out.print("*");
}
System.out.println("");
}
}
Outputnya :
0 comments:
:)) :)] ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} ~x( :-t b-( :-L x( =))
Post a Comment