Java expressions: ut+1/2ft2, |a|+b>=|b|+a,  e|2x^2-4x|

Q27. Write equivalent Java expressions for the following expressions:

  1. ut+1/2ft2
  2. |a|+b>=|b|+a 
  3. e|2x^2-4x|

Ans 1. ut+1/2ft2

u*t+1/2*f*t*t

Ans 2. |a|+b>=|b|+a 

Math.abs(a)+b >=Math.abs(b)+a

Ans 3.

Math.pow( ( 3*x+5*y)  / (5*x+3*y) – (8*x*y )/ (2*y*x),( 3 / 2))

Ans 4. e|2x^2-4x|

Math.exp(2*Math.pow(x,2)-4*x)

Leave a Reply

Your email address will not be published. Required fields are marked *

23 Views
%d bloggers like this: