Java Program to Find Circumference of a Circle

bookmark

class Main
{
    public static void main(String [] args)
    {
        //raius value declared
        double r = 4;
        //pie value declared
        double pi = 3.14;
        // formula to find circumference of the circle
        double c = 2 * pi * r;
        System.out.println("The circumference of the circle is: " + c);
    }
}

 


Output:

The circumference of the circle is: 25.12