Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package test;
- /*
- *
- ***
- *****
- *******
- *********
- */
- class Test{
- public static void main(String[] args){
- for(int i=1; i<=5; i++) {
- for(int k=4; k>=i; k--) {
- System.out.print(" ");
- }
- for(int j=1; j<=2*i-1;j++) {
- System.out.print("*");
- }
- System.out.println("");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement