Debug the followingprogram to find the area of a circle
(Area=3.14*r*r, where r is the radius):
public circleArea
{
public static void main(Stringargs[])
{
System.in.println("Enter radius in cm: ");
int r= in.nextInt();
System.out.println("Area of the circle in sq.cm: "+(3.14*r*r));
}
}
Answers
Answered by
2
Answer:
Debug the followingprogram to find the area of a circle
(Area=3.14*r*r, where r is the radius):
public circleArea
{
public static void main(Stringargs[])
{
System.in.println("Enter radius in cm: ");
int r= in.nextInt();
System.out.println("Area of the circle in sq.cm: "+(3.14*r*r));
}
}
Similar questions