a Java program to generate area for circle
Answers
Answered by
1
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
606
Java Program to Generate Area for Circle :
important java. util. scanner ;
class Areaofcircle
{
Public static void main ( String args [ ] )
{
scanner S = new scanner ( system. in) ;
system.out.printIn (“ Enter radius ”) ;
double r = s. next Double ( ) ;
double area = (22 × r × r) / 7
system. out. printIn ( “ Area of Circle is ;” + area) ;
}
}
Note :
- Output is in attachment provided above !
____________________
Attachments:
Similar questions