* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates * and open the template in the editor. */ package anaktangga; import java.util.Scanner; /** * * @author hp */ public class AnakTangga { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner input = new Scanner(System.in); System.out.print("Masukkan n Anak Tangga : "); int n = input.nextInt(); for(int i=1;i<=n;i++){ for (int k=i;k>0;k=k-1){ System.out.print("* ");} System.out.println();}}}