You are on page 1of 8

JAVA MATH

1. MAX
2. MIN
3. SQRT
4. ABS
5. RANDOM
JAVA MATH
Create a program that will get 2 numbers
from the user them print the max and
min number them compute and print the
squareroot of the sum of the 2 numbers
Sample output
Input two number
6
3
Max = 6
Min = 3
SQRT = 3
Which is the syntax for method in finding the
higher number?
A. Math.max(x,y);
B. Math.low(x,y);
C. Math.min(x,y);
D. Math.high(x,y);
Which is the syntax for method in finding the
lower number?
A. Math.max(x,y);
B. Math.low(x,y);
C. Math.min(x,y);
D. Math.high(x,y);
Which is the syntax for method in finding the
lower number?
A. Math.sqt(x,y);
B. Math.sqr(x,y);
C. Math.sqrt(x,y);
D. Math.sq(x);
Which is the syntax for method in finding the
ramdom number?
A. Math.random()
B. Math random
C. Math.ran();
D. Math.sq(x);
Activity 10 pts

Create a program that


will function as a
random number picker
from 0 to 10
Math.random()

You might also like