import java.util.*;
public class segitiga {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a,b,c;
System.out.print("Masukan Angka : ");
a = input.nextInt();
for(b=1;b<=a;b++)
{
for(c=1;c<=b;c++)
{
System.out.print("* ");
}
System.out.println("");
}
System.out.println("\n\n");
}
}
Tidak ada komentar:
Posting Komentar
Please Leave Your Comment :)