import java.util.Scanner ;
class MathTest
{
public static void main
( String [ ] args
) {
int number1;
double number2;
Scanner scanner
= new Scanner
( System .
in ) ;
System .
out .
print ( "Input integer value: " ) ; number1 = scanner.nextInt ( ) ;
System .
out .
print ( "Input double value: " ) ; number2 = scanner.nextDouble ( ) ;
double squareRoot
= Math .
sqrt ( number1
) ; double randomNumber
= Math .
random ( ) * number1
; double floor
= Math .
floor ( number2
) ; double ceiling
= Math .
ceil ( number2
) ; long round
= Math .
round ( number2
) ; double larger
= Math .
max ( number1, number2
) ; double smaller
= Math .
min ( number1, number2
) ;
System .
out .
println ( "Square root of " + number1
+ " is " + squareRoot
) ; System .
out .
println ( "One random number between 0 and " + number1
+ " can be " + randomNumber
) ; System .
out .
println ( "Value of the floor of " + number2
+ " is " + floor
) ; System .
out .
println ( "Value of the ceiling of " + number2
+ " is " + ceiling
) ; System .
out .
println ( "Value of round of " + number2
+ " is " + round
) ; System .
out .
println ( "The larger value between " + number1
+ " and " + number2
+ " is " + larger
) ; System .
out .
println ( "The smaller value between " + number1
+ " and " + number2
+ " is " + smaller
) ;
}
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKY2xhc3MgTWF0aFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpCgl7CgkJaW50IG51bWJlcjE7CgkJZG91YmxlIG51bWJlcjI7CgkJCgkJU2Nhbm5lciBzY2FubmVyID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQkKCQlTeXN0ZW0ub3V0LnByaW50KCJJbnB1dCBpbnRlZ2VyIHZhbHVlOiAiKTsKCQludW1iZXIxID0gc2Nhbm5lci5uZXh0SW50KCk7CgkJU3lzdGVtLm91dC5wcmludCgiSW5wdXQgZG91YmxlIHZhbHVlOiAiKTsKCQludW1iZXIyID0gc2Nhbm5lci5uZXh0RG91YmxlKCk7CgkJCgkJZG91YmxlIHNxdWFyZVJvb3QgPSBNYXRoLnNxcnQobnVtYmV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