*.*.
*..*..*..
*...*...*...*...
*....*....*....*....*....
*.....*.....*.....*.....*.....*.....
*......*......*......*......*......*......*......
*.......*.......*.......*.......*.......*.......*.......*..
public class PrintStar { public static void main(String[] args) { // TODO, add your application code for(int row=0;row<7;row++){ //输出数字 for(int star=0;star<=row+1;star++){ System.out.print("*"); for(int space=0;space<=row;space++){ //输出空格 System.out.print("."); } } System.out.println(); } } }
作者:jaycee110905 发表于2013-5-11 0:03:04 原文链接
阅读:0 评论:0 查看评论