java桃心

来源:互联网 发布:网络分销合作协议书 编辑:程序博客网 时间:2024/06/07 09:32
package g;public class kobe {    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.print("\n");                 }          }      }

这里写图片描述

原创粉丝点击