Java爱心代码

编程知识 更新时间:2023-04-07 06:03:56
public class Love {
    public static void main(String[] args) throws InterruptedException {
        int count = 0;
        for (float y = 2.5f;y > -2.0f;y -= 0.12f){
            for (float x = -2.3f;x < 2.3f;x += 0.041f){
                float a = x * x + y * y - 4f;
                if ((a * a * a - x * x * y * y * y) < -0.0f){
                    String str = "I LOVE YOU!";
                    int num = count % str.length();
                    System.err.print(str.charAt(num));
                    count ++;
                }else {
                    System.err.print(" ");
                }
            }
            System.err.println();
            Thread.sleep(80);
        }
            System.out.println("\033[96m" + "多热烈的白羊");
            System.out.println("热烈的好抽象");
    }
}

 

更多推荐

Java爱心代码

本文发布于:2023-04-07 06:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/c727008ffb5ad893c81c9674372a8d20.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:爱心   代码   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 52455文章数
  • 14阅读数
  • 0评论数