/**
*
***
*****
打印如图金字塔
*=i*2-1
(竖)空格数=列数-1
*/
public class Circulate{
public static void main(String[] args){
int count = 3;
for (int i = 1; i <= count; i++) {
//控制打印空格次数
for (int j = i; j <= count; j++) {
System.out.print(" ");
}
//控制打印*次数
for (int c = 0; c < 2*i-1; c++) {
System.out.print("*");
}
System.out.println();
}
}
}
标签:九九乘法,java,int,打印,金字塔,public
From: https://www.cnblogs.com/xiaoto9426/p/16728621.html