0 votes
in JAVA by
Write a program to generate the following output.

****

***

**

*

1 Answer

0 votes
by
Write a program to generate the following output in java?

*

**

****

*****

******

public class star {

     public static void main(String[] args) {

         int i;

         int count=1;

        for (i=1;i<=5;i++){

            for (int j=1;j<=i;j++)

                System.out.print("*");

            System.out.println(" ");

        }

}

}

Related questions

0 votes
asked May 3, 2021 in JAVA by Robindeniel
0 votes
asked Apr 9, 2021 in JAVA by Robindeniel
...