Write a program to find area & circumference from given radius

Write a program to find area & circumference from given radius
class test
{
Public static void main(String args[])
{
int r=10;
double x,y;
a=3.14*r*r;
c=2*3.14*r;
System.out.println(“Area is “+a);
System.out.println(“Circumference is “+c);
}
}

Output:
Area is 314
Circumference is 62.8

Leave a Reply

Your email address will not be published. Required fields are marked *