public class Bintang2
{
public static void main (String[] args)
{
int n = 9;
for(int i=1; i<=n; i++)
{
for(int j=n; j>i; j--)
{
System.out.print(" ");
}
for(int k=1; k<=i; k++)
{
System.out.print("X ");
}
System.out.println();
}
System.out.println();
System.out.print("baris = " + n);
}
}
OUT PUT
0 komentar:
Posting Komentar