Falling in love with you is the easiest thing I've ever done, nothing is more important than you!
好多话想说,但最终还是没说出口,它在春风中吻向你的眉眼,在日落晚霞里描摹你的容颜,在我看向你的眼神中隐忍而又热烈。所以借这个代码表达出你的心声,别让等待成为遗憾!
代码如下:
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="LOVE";
int num =count%str.length();
System.err.print(str.charAt(num));
count++;
}
else{
System.err.print(" ");
}
}
System.err.println();
Thread.sleep(100);
}
System.out.println("如果能好好被爱!");
System.out.println("谁不想呆在一个人身边一年有一年呢!");
}
}
效果图如下:
有兴趣的朋友可以试试!