Wap to print | Sololearn: Learn to code for FREE!

-1

Wap to print

* ** *** ****

12/20/2016 3:01:22 PM

Shakirr Khan

1 Answer

New Answer

0

Try this. class Star{ public static void main(String[] args) { int num = 10; for (int i = 0;i<num ;i++ ) { for (int j = num;j!=0 ;j-- ) { System.out.print(" "); } for (int k = 0;k<i ;k++ ) { System.out.print("*"); } num--; System.out.println(); } } }