1.

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

Answer»

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


Discussion

No Comment Found