无聊好玩

心型打印[

package play;

public class Heart {
	public static void main(String[] args) {
		for (float i = 1.5f; i >- 1.5f; i-=0.15f) {
			for (float j = -1.5f; j < 1.5f; j+=0.05f) {
				float a=i*i+j*j-1;
				String str=(a*a*a-j*j*i*i*i)<=0.0f? "*":" ";
				System.err.print(str);
			}
			System.out.println("");
		}
	}
}


![在这里插入图片描述](https://img-blog.csdnimg.cn/20200116085138241.PNG?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTc5MTE3OQ==,size_16,color_FFFFFF,t_70)
发布了1 篇原创文章 · 获赞 0 · 访问量 3

猜你喜欢

转载自blog.csdn.net/weixin_45791179/article/details/103998743