打印菱形星号
来源:互联网 发布:ios 游戏修改软件 编辑:程序博客网 时间:2024/06/05 02:49
public class XingHao {
public static void main(String[] args) {
for(int i=1;i<=3;i++){
for(int j=1;j<=3-i;j++){
System.out.print(" ");
}
for(int k=1;k<=2*i-1;k++){
System.out.print("*");
}
System.out.println();
}
for(int i=1;i<=2;i++){
for(int j=1;j<=i;j++){
System.out.print(" ");
}
for(int k=1;k<=5-2*i;k++){
System.out.print("*");
}
System.out.println();
}
}
}
public static void main(String[] args) {
for(int i=1;i<=3;i++){
for(int j=1;j<=3-i;j++){
System.out.print(" ");
}
for(int k=1;k<=2*i-1;k++){
System.out.print("*");
}
System.out.println();
}
for(int i=1;i<=2;i++){
for(int j=1;j<=i;j++){
System.out.print(" ");
}
for(int k=1;k<=5-2*i;k++){
System.out.print("*");
}
System.out.println();
}
}
}
0 0
- 打印菱形星号
- 打印菱形星号
- 打印菱形星号
- 用星号打印菱形
- 打印菱形星号
- 打印菱形星号组合
- 打印菱形星号组合
- 打印菱形星号
- 打印菱形星号组合
- 打印菱形星号组合
- 打印菱形星号
- 打印菱形星号
- Java-用星号打印菱形
- C语言程序之打印菱形星号
- 题目:编写程序,打印菱形星号组合
- C语言入门:打印菱形星号“*”图案
- 4-9 打印菱形星号"*"图案
- 菱形星号
- 简单注册界面程序设计
- 四种方式实现Flex页面跳转
- tpcds数据集
- webpack入门学习1
- 第十二周(Consecutive)
- 打印菱形星号
- 城市里的间谍(A Spy in the Metro UVa 1025)最详细题解
- SpringMvc之参数绑定注解详解
- 汇编语言基础
- oracle,使用cmd命令行创建用户、数据库
- 重建二叉树
- C++第五次作业
- Spring Boot参考文档(1)
- 小白零开始,从原型链开始查询方法之路