-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.java
More file actions
24 lines (17 loc) · 815 Bytes
/
math.java
File metadata and controls
24 lines (17 loc) · 815 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
public class math {
public static void main(String[] args) {
double valueA = 50.5;
double valueB = 49.99;
int valueC = -33;
int myValue = 9;
System.out.println("Max : " + Math.max(valueA, valueB));
System.out.println("Min : " + Math.min(valueA, valueB));
System.out.println("Ceil valueA : " + Math.ceil(valueA));
System.out.println("Floor valueA : " + Math.floor(valueA));
System.out.println("Absulate valueC : " + Math.abs(valueC));
System.out.println("Random No. valueC : " + Math.ceil(Math.random() * 100000 + 1));
System.out.println("Squar myValue : " + Math.sqrt(myValue));
System.out.println("Squar myValue : " + Math.PI);
System.out.println("Squar myValue : " + Math.pow(myValue, 2));
}
}