Write a Java program to initialise the radius of a circle and find the circumference and area of the ccircle.I am in 8 grade please help me.
Answers
Answered by
0
Answer:
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the radius of the circle:");
double rad = sc.nextDouble();
double area = 3.14d*rad*rad;
double circumference = 3.14d*2*rad;
System.out.println("The area of the circle is " + area);
System.out.println("The circumference of the circle is " + circumference);
}
}
Explanation:
Similar questions
English,
10 hours ago
English,
20 hours ago
Math,
20 hours ago
Political Science,
8 months ago
English,
8 months ago