Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

heart

public class Heart {
public static void main(String argv[]){
    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");
    }
}
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.