想要向代碼浪漫地向TA示愛,但是可憐沒有大佬的技術,Java小白如何向心中的那個ta表達愛意。
工具:電腦一臺 軟件:eclipse
開始
package xin;
public class AiXin {
public static void main(String[] args) {
// TODO Auto-generated method stub
for(float y = (float) 1.5;y>-1.5;y -=0.1)
{
for(float x= (float) -1.5;x<1.5;x+= 0.05)
{
float a = x*x+y*y-1;
if((a*a*a-x*x*y*y*y)<=0.0)
{
System.out.print("*");
}
else
System.out.print(" ");
}
System.out.println();
}
}
}
最後效果
最後的最後,想要 ja va 學習資料的Q1喲