Computer Science, asked by rawatrohan443, 5 months ago

Write a Program to input radius of a circle and find Area of a Circle​

Answers

Answered by anindyaadhikari13
1

Question:-

  • Write a program to input radius of a circle and find the Area of the Circle.

Code:-

import java.util.*;

class Circle

{

public static void main(String s[])

{

Scanner sc=new Scanner(System.in);

System.out.print("Enter the radius: ");

double rad=sc.nextInt();

double area=22.0/7.0 *Math.pow(rad, 2);

System.out.println("The area of the circle is: "+area);

}

}

Answered by ankitmaskey044
0

CLS

INPUT"enter the radius";

INPUT"enter the area";

Now,

Area=2πr

INPUT"Enter the area";

END

Similar questions