- public class IsoscelesTriangle
- {
- public static void main(String[] args)
- {
- for (int x=0;x<4 ;x++ )
- {
- //-------补上你的空格---------------
- for(int i = 0;i<(3-x);i++){
- System.out.print(" ");
- }
- //----------------------------------
- for (int y=0;y<2*x+1 ;y++ )
- {
- System.out.print("*");
- }
- System.out.println();
- }
- }
- }
复制代码 |