Computer Science, asked by tanwardhaniram8, 2 days ago

4) write a program that inputsradius of a circle and finds itsperimeter.



Answers

Answered by lxlxlItzYourLifelxlx
1

Answer:

import java.util.Scanner;

public class AreaAndCircumferenceOfCircle.

{

public static void main(String args[])

{

double circumference, area;

int radius;

//object of the Scanner class.

Answered by nihasrajgone2005
1

import java.util.Scanner;

public class calculate

{ double radius= sc. nextDouble(); double circumference=2*Math.PI radius; double area= Math. Pl*radius*radius;

public static void main(String[] args)

{

Scanner sc= new Scanner (System.in);

System.out.println("Enter the radius of the circle: ");

System.out.println("The circle with radius"+radius+" has an area of: "+area);

System.out.println("The circle with radius"+radius+" has a circumference of: "+circumference);

}

}

Similar questions