0
Output?? Helpp
I want to output this : * ** *** **** ***** but it outputs this: * * * * * * * * * * * * * * * Code: int i=1; while(i<=5){ int j=1; while(j<=i){ System.out.println("* "); j++; } System.out.println(); i++; }
1 Answer
+ 6
Remove "ln" from 1st print statement
System.out.println("* ");
Rewrite it as
System.out.print("* ");