WAP to find area of circle.

1 year ago
OOP Java

Compile code:

public class Area_Of_Circle{
    public static void main(String[] args)
    {
        int radius=2;
        double pi = 3.142, area;
        area = pi * radius * radius;    
        System.out.println("Area of circle is: " + area);
    }
}

Output:

0
Dipti KC
Jan 8, 2023
More related questions

Questions Bank

View all Questions