Write a program to compute the area of the circle.

0
/*  Write a program to compute the area of the circle. */

class Area{
    public static void main(String args[]){
        double pi,r,a;
        pi=3.1416;
        r=10.8;
        a=pi*r*r;
        System.out.println("Area of circle:"+a);
        }
    }

/*
Output:

E:>javac Area.java
E:>java Area

Area of circle:366.436224


*/

About the author

Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus. Aenean fermentum, eget tincidunt.

0 comments:

Recent Posts