write down java expression for
x= |A|+|B|+|AB|
Answers
Answered by
2
Question:-
JAVA expression for
- x=|A|+|B|+|AB|
____________________
Answer:-
x=Math.abs(A)+Math.abs(B)+Math.abs(A*B);
__________________
Note:-
- Math.abs() always returns a value depending upon the data type of the value.
- Math.abs() always returns an absolute valve of the given number (returns the positive value).
__________________
More about math functions:-
- Math.max() is used to find the maximum value between 2 numbers. SYNTAX:- Math.max(a,b);
- Math.min() returns the minimum value between two numbers. SYNTAX:- Math.min(x,y);
- Math.pow() is returns a number raised to power x ({n}^{x}) SYNTAX:- Math.pow(n,x);
- Math.ceil() returns rounded value upto nearest higher integer. SYNTAX:- Math.ceil(x);
- Math.floor() returns rounded value upto nearest lower integer. SYNTAX;- Math.floor(x);
- Math.round() returns the rounded value of the number upto nearest integer.
- Math.cbrt() returns cube root of a number. SYNTAX:- Math.cbrt(x);
- Math.sqrt() returns square root of a number. SYNTAX:- Math.sqrt(x);
Similar questions
Biology,
2 months ago
Physics,
2 months ago
English,
6 months ago
Physics,
11 months ago
Political Science,
11 months ago