当前位置:网站首页>打印星型图「建议收藏」
打印星型图「建议收藏」
2022-08-09 15:36:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
package 算法;
public class 打印星型图 { public static void main(String[] args) { for(int i=1;i<4;i++){ for(int j=0;j<(i-1)*2+1;j++){ System.out.print(“*”); } System.out.println(); } for(int i=3;i>0;i–){ for(int j=(i-1)*2+1;j>0;j–){ System.out.print(“*”); } System.out.println(); } }
}
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/106029.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢
自定义过滤器和拦截器实现ThreadLocal线程封闭

网络——介质访问控制

智慧灯杆网关智慧交通应用

How bad can a programmer be?

Access Characteristics of Constructor under Inheritance Relationship

NFT+IDO预售代币合约模式系统开发

Chapter 2: Creating Interactive Maps (2.4-2.6)

Detailed explanation of three pieces in C language

Heap series_0x09: Example of heap corruption (illegal access + uninitialized + heap handle mismatch)

设计一个登录小程序(while和getchar实现)
随机推荐
如何判断闰年
良匠-手把手教你写NFT抢购软(二)
利用C#传输Json数据
网络——虚拟专用网和地址转换NAT
Prometheus完整安装
August 9, 2022: Build .NET apps in C# -- use the Visual Studio Code debugger to interactively debug .NET apps (won't, fail)
一.字符 字符串 指针字符
C语言循环结构之万恶之源goto语句
PHP completes missing dates in date ranges/returns missing dates
二.sizeof和strlen的区别
uniapp 项目搭建
ECCV 2022 | BMD: 面向无源领域自适应的类平衡多中心动态原型策略
Became CTO, was killed by my boss in 6 months, I lost 10 million
Collection of DP Optimization Methods
测试工作管理与规范
CompletableFuture异步线程优化代码
IDEA中操作数据库 以MySQL为例,可以放弃Navicat了
Why does a four-byte float represent a wider range than an eight-byte long
网络——介质访问控制
零基础爬虫regex练习「音乐抓取」