-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEx6Math.java
More file actions
17 lines (14 loc) · 552 Bytes
/
Copy pathEx6Math.java
File metadata and controls
17 lines (14 loc) · 552 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package JavaEntry;
public class Ex6Math {
public static void main(String[] arg){
byte x = 10;
byte y = 5;
int MaxValue = Math.max(x, y);
int MinValue = Math.min(x, y);
int RandomValue = (int) (Math.random() * 11);
int PositiveValue = Math.abs(-79);
System.out.println("Max value is: " + MaxValue + " and Min value is: " + MinValue);
System.out.println("Make this positive: " + PositiveValue);
System.out.println("Random value between two 1 to 10: " + RandomValue);
}
}