a Java program for generating area of circle
Answers
Answered by
2
Heya.....❤️❤️
★ ★ ★ ★ ★ ★ ★ ★
class AreaofCircle{
public static void main()
{
{
int r = 7;
int Area = 22/7 * 7 * 7;
System.out.println("Area of circle = " + Area);
}
}
}
Output
Area of circle = 154
____________________________________________________________________________________
Java is a predifined computer specialized coding.
Java follows some rules in the programs.
★ ★ ★ ★ ★ ★ ★ ★
class AreaofCircle{
public static void main()
{
{
int r = 7;
int Area = 22/7 * 7 * 7;
System.out.println("Area of circle = " + Area);
}
}
}
Output
Area of circle = 154
____________________________________________________________________________________
Java is a predifined computer specialized coding.
Java follows some rules in the programs.
mayankpanwar20pbrf61:
Hey.
Answered by
0
Hi
Here is the answer
Static Method
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.util.Scanner;
class AreaOfCircle
{
public static void main(String args[])
{
Scanner s= new Scanner(System.in);
System.out.println("Enter the radius:");
double r= s.nextDouble();
double area=(22*r*r)/7 ;
System.out.println("Area of Circle is: " + area);
}
}
Output:
1
2
3
Enter the radius :
7
Area of circle : 154.0
Hope it helps and mark me brainliest
Here is the answer
Static Method
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.util.Scanner;
class AreaOfCircle
{
public static void main(String args[])
{
Scanner s= new Scanner(System.in);
System.out.println("Enter the radius:");
double r= s.nextDouble();
double area=(22*r*r)/7 ;
System.out.println("Area of Circle is: " + area);
}
}
Output:
1
2
3
Enter the radius :
7
Area of circle : 154.0
Hope it helps and mark me brainliest
Similar questions