admin管理员组

文章数量:1794759

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

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

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