package com.hanqi;
public class lingxing {
public static void main(String[] args) {
for(
int m=1;m<=10;m++
)
{
//输出空格
for(
int n=9;n>=m;n--
)
{
System.out.print(" "
);
}
//输出*
for(
int n=1;n<=m;n++
)
{
System.out.print("*"
);
}
for(
int n=1;n<m;n++
)
{
System.out.print("*"
);
}
System.out.println(" "
);
}
for(
int m=1;m<=9;m++
)
{
//输出空格
for(
int n=1;n<=m;n++
)
{
System.out.print(" "
);
}
//输出*
for(
int n=9;n>=m;n--
)
{
System.out.print("*"
);
}
for(
int n=9;n>m;n--
)
{
System.out.print("*"
);
}
System.out.println(" "
);
}
}
}
转载于:https://www.cnblogs.com/wangchuanqi/p/5220832.html
转载请注明原文地址: https://mac.8miu.com/read-16107.html