Computer Science, asked by aaryaswarup, 6 months ago

Write a program in Java to accept the perimeter of a circle from user and the compute its area.

Answers

Answered by gs30072005
0

Answer:

import java.util.Scanner;

public class Area

{

public static void main(String[] args)

{

int r;

double pi = 3.14, area;

Scanner s = new Scanner(System.in);

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

r = s.nextInt();

area = pi * r * r;

System.out.println("Area of circle:"+area);

}

}

Similar questions