Computer Science, asked by tipsand100, 6 months ago

Write java program to input radius of a circle and print area of circle​

Answers

Answered by ManswiPradhan
2

Answer:

The program output is also shown below.

public class Circle.

int r;

double pi = 3.14, area;

Scanner s = new Scanner(System.

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

r = s. nextInt();

area = pi * r * r;

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

Answered by bhumika4961
3

Answer:

public class Circle

{

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);

like this...........

Similar questions