Skip to content

Commit 08f0179

Browse files
authored
Create Area_of_circle.java
This simple java program to calculate area of circle. Please try it. Thanks
1 parent 9fd3485 commit 08f0179

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Area_of_circle.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#https://www.facebook.com/jeet/posts/2729372946102639
2+
# Subscribed by Code House
3+
4+
import java.util.Scanner;
5+
public class Area
6+
{
7+
public static void main(String[] args)
8+
{
9+
int r;
10+
double pi = 3.14, area;
11+
Scanner s = new Scanner(System.in);
12+
System.out.print("Enter radius of circle:");
13+
r = s.nextInt();
14+
area = pi * r * r;
15+
System.out.println("Area of circle:"+area);
16+
}
17+
}

0 commit comments

Comments
 (0)