Advertisements
Advertisements
Question
Write a Java expression for the following :
ax5 + bx3 + c
One Line Answer
Advertisements
Solution
a.Math.pow(x,5) + b.Math.pow(x,3) +c;
shaalaa.com
Introduction of Operators in Java
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
Write a difference between unary and binary operator.
What is meant by a package?
Name the operators listed below are
(i) <
(ii) + +
(iii) &&
(iv) ? :
Write one difference between / and % operator.
Write down java expression for:
`"T" = sqrt("A"^2 + "B"^2 + "C"^2)`
Rewrite the following using ternary operator:
if (x%2 == o)
System.out.print(“EVEN”);
else
System.out.print(“ODD”);
Write a Java expression for the following :
`sqrt(3"x"+"x"^2)/"a+b"`
Rewrite the following using ternary operator :
if (bill > 10000)
discount = bill * 10.0 / 100;
else
discount = bill * 5.0 / 100;The code obtained after compilation is known as ______.
Write the Java expression for (a + b)x.
