How java *** + output of the first row, second row ** + + + + + * The third line in the terminal?

How to output the following pattern?

***+

**++

*+++

Codes are as follows:

public class XingXing{
public static void main(String...args){
for(int i=1;i<=3;i++){
for(int j=3;i<=j; j--)
System.out.print("*");
for(int j=1; j<=i; j++)
System.out.print("+");

System.out.println();
}
}
}

Guess you like

Origin www.cnblogs.com/Zhu1316802150/p/11907544.html