Write Java expression for the following : | 3x + 7y |
Answers
Answered by
1
Answer:
- Java expression for | 3x + 7y |
- Math.abs((3*x)+(7*y))
Answered by
2
Question:-
➡ Write the Java expression for the following, |3x + 7y|
Solution:-
The Java expression for |3x + 7y| will be,
➡ Math.abs(3*x + 7*y);
➡Math.abs() function is used to display the absolute value of any number.
➡ *(asterisk) operator is used for calculating the product.
➡ +(addition) operator is used for calculating the sum as well as to concatenate two strings.
Similar questions
English,
2 months ago
Political Science,
2 months ago
Physics,
2 months ago
Geography,
5 months ago
Social Sciences,
10 months ago
Geography,
10 months ago
Hindi,
10 months ago