-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAreaofcircle.java
More file actions
30 lines (23 loc) · 786 Bytes
/
Areaofcircle.java
File metadata and controls
30 lines (23 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//import java.util.*;
public class Areaofcircle {
public static void main(String[] args) {
// Scanner sc = new Scanner(System.in); // area of circle
// float redius = sc.nextFloat();
// float area = 3.14f*redius*redius;
// System.out.println(area);
// float num1 = 10.5f; // type casting
// int num2 = (int)num1;
// System.out.println(num2);
// char a = 'a'; // type casting
// char b = 'b';
// System.out.println((int)(a));
// System.out.println((int)(b));
// System.out.println(b-a);
int a = 10; // type promotion
float b = 20.25f;
long c = 30;
double d = 40;
double ans = a + b + c + d;
System.out.println(ans);
}
}