a Java program for generating area of circle
Answers
Answered by
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
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
2
ÊLLØ'.....!!
_______________________________
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
English,
6 months ago
Geography,
6 months ago
India Languages,
6 months ago
Math,
1 year ago
Math,
1 year ago