Baka may nakakaalam po mga boss salamat sa tutulong
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
ay sige sige lods salamat
import java.lang.Math;
class Math_Operation
{
public static void main(String[] args)
{
// floor() returns he largest (closest to positive infinity)
// double value that is less than or equal to the argument and
// is equal to a mathematical integer
System.out.println("Math.floor(10) = "+Math.floor(10));
System.out.println("Math.floor(7) = "+Math.floor(7));
//ceil() Returns the smallest (closest to negative infinity)
// double value that is greater than or equal to the argument
// and is equal to a mathematical integer
System.out.println("Math.ceil(6.251) = "+Math.ceil(6.251));
//min() Returns the smaller of two int values
System.out.println("Math.min(17,41) = "+Math.min(17, 41));
//pow() Returns the value of the first argument raised to the power of the second argument
System.out.println("Math.pow(6,2) = "+Math.pow(6, 2));
//abs() Returns the absolute value of an int value
System.out.println("Math.abs(-53) = "+Math.abs(-53));
//round() Returns the closest long to the argument
System.out.println("Math.round(21.47) = "+Math.round(21.47));
}
}
maraming salamat lodsclass name - Math_Operation
fileName - Math_Operation.java
Java:import java.lang.Math; class Math_Operation { public static void main(String[] args) { // floor() returns he largest (closest to positive infinity) // double value that is less than or equal to the argument and // is equal to a mathematical integer System.out.println("Math.floor(10) = "+Math.floor(10)); System.out.println("Math.floor(7) = "+Math.floor(7)); //ceil() Returns the smallest (closest to negative infinity) // double value that is greater than or equal to the argument // and is equal to a mathematical integer System.out.println("Math.ceil(6.251) = "+Math.ceil(6.251)); //min() Returns the smaller of two int values System.out.println("Math.min(17,41) = "+Math.min(17, 41)); //pow() Returns the value of the first argument raised to the power of the second argument System.out.println("Math.pow(6,2) = "+Math.pow(6, 2)); //abs() Returns the absolute value of an int value System.out.println("Math.abs(-53) = "+Math.abs(-53)); //round() Returns the closest long to the argument System.out.println("Math.round(21.47) = "+Math.round(21.47)); } }
Code:
View attachment 1789905
Output:
View attachment 1789906
Welcomemaraming salamat lods