空心的菱形啊

import java.util.*;
public class Ge
{	
	public static void main(String[] args){
     
int row=7;
for(int i=-row;i<=row;i++)
		{
     int a=(i<0)?-i:i;
     for (int j=0;j<=row*2 ;j++ )
     {
		 if(a==j || a==row*2-j)
         {System.out.print("*");}
		 else{System.out.print(" ");
		 }

  



     }

     System.out.println();



		}


      
	}
	

	
}

  

posted @ 2017-03-30 21:00  苏轼的红烧肉  阅读(110)  评论(0编辑  收藏  举报