Skip to content

Instantly share code, notes, and snippets.

@sugiartocokrowibowo
Created October 4, 2017 12:53
Show Gist options
  • Select an option

  • Save sugiartocokrowibowo/ecd779e4da1232681a1d9a2f2371a708 to your computer and use it in GitHub Desktop.

Select an option

Save sugiartocokrowibowo/ecd779e4da1232681a1d9a2f2371a708 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class F {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.println("INPUT");
System.out.print("a : ");
int a = s.nextInt();
System.out.println("\nOUTPUT");
for(int i=1;i<=a;i++){
for(int j=1;j<=i;j++){
System.out.print("* ");
}
System.out.println();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment