Falling in love with you is the easiest thing I've ever done, nothing is more important than you!

小小的撒一波狗粮,废话不多说,直接上代码:

public class xin {
    public static void main(String[] args){
        for (float y=1.5f;y>-1.5f;y-=0.1f){
            for (float x=-1.5f;x<1.5f;x+=0.05f){
                float a=x*x+y*y-1;
                if ((a*a*a-x*x*y*y*y)<0.0f){
                    System.out.print("*");
                }else {
                    System.out.print(" ");
                }
            }
            System.out.print("\n");
        }
    }
}

效果图:

有兴趣的朋友可以去试一试

更多推荐

【爱心】JAVA表白代码——属于程序员的浪漫