Java Program to Find Area of Inner Circle which Passes through Center of Outer Circle and Touches its Circumference

bookmark

import java.io.*;
class Main
{
    public static void main(String [] args)
    {
        double R = 20;
        // formula to find radius of the circle C2
        double r =  R/2;     
        // formula to find area of the circle C2
        double Ar = 3.14 * r * r;
        System.out.println("The area of the circle C2 is " + Ar);
    }
}

 


Output:

The area of the circle C2 is 314.0