Computer Science, asked by harshyo15, 1 year ago

Create class Circle having variable radius and method area which finds the area

of a circle. Use default and parameterized constructor to initialize the values of

radius. Write a C++ program to calculate the area for three circles.​

Answers

Answered by Anonymous
1

import java.util.*;

public class Radius

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

float p,r;

System.out.println("Enter the perimeter");

p=in.nextFloat();

r=p*(7/22)*(1/2);

System.out.println("The radius is"+r);

}

}

Similar questions