Computer Science, asked by unknown3950, 20 hours ago

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 samarthkrv
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