Computer Science, asked by mahibisht01, 1 year ago

Write a program in java to find area of a circle with radius 13.8cm​

Answers

Answered by rakeshchennupati143
1

Program:

import java.util.*;

public class Main{

   public static void main(String args[]){

       System.out.println("Area of the circle is : "+(3.14 * 13.8 * 13.8)+"units.");

   }

}

Output:

Area of the circle is : 597.9816000000001 untis.

Explanation:

  1. i wrote all the program in 5 lines.
  2. directly printed by taking pie value as 3.14 and radius as 13.8.
  3. so i calculated 3.14 x 13.8 x 13.8.
  4. ∵ Area of circle is πr².
  5. and printed directly
Similar questions