图案输入
如何打印如下图形:
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
给个思路。。。谢谢
------解决方案--------------------System.out.print( "* * * * * * * *\n* * * * * * * *\n* * * * * * * *\n* * * * * * * *\n* * * * * * * *\n* * * * * * * * ");
------解决方案--------------------public class TestOutput
{
private static int ROW = 6;
private static int COLUMN = 8;
private static String SIGN = "* ";
public static void main(String[] args)
{
String temp = " ";
for(int i=0;i <ROW;i++)
{
if(i%2==1)
temp = " ";
for(int j=0;j <COLUMN;j++)
{
temp += SIGN + " ";
}
System.out.println(temp);
temp = " ";
}
}
}