Computer Science, asked by Abhishekhero1, 1 year ago

write a program in Java to assign radius with a value find and print area of circle using the formula: area=πR^2.

Answers

Answered by gurman13
14
//circle
public class circle
{
int r;
double area;
public void area()
{
r=4;
area=pi*r*r;
System.out.println("Area of circle is"
+ area);
}//method closed
}//class closed
Similar questions