Math, asked by javakeyasker, 1 year ago

a Java program for generating area of circle

Answers

Answered by SaNuExTrEmE
0
class AreaofCircle{
   public static void main()
   {
     {
     int r = 9;
     int Area = 22/7 * 9 * 9;
     System.out.println("Area of circle = " + Area);

     }
     }
   }

        Output

Area of circle = 254


Answered by Anonymous
2

ÊLLØ'.....!!

_______________________________

\Huge{\mathfrak{\underline{\underline{answer}}}}

1. import java.util.Scanner;

2. public class Area

3. {

4. public static void main(String[] args)

5. {

6. int r;

7. double pi = 3.14, area;

8. Scanner s = new Scanner(System.in);

9. System.out.print("Enter radius of circle:");

10. r = s.nextInt();

11. area = pi * r * r;

12. System.out.println("Area of circle:"+area);

13. }

14. }

_______________________________

THÅÑKẞ.....!!

Similar questions