/test.java Secret
Created
July 10, 2018 13:33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args){ | |
Scanner sc=new Scanner(System.in); | |
int a = sc.nextInt(); | |
String b="*"; | |
int cnt= 0; | |
for(int i=0; i<a; i++) { | |
cnt++; | |
for(int j=0; j<cnt; j++) { | |
System.out.print(b); | |
} | |
System.out.println(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment