Write C++ expression.

Q31. Write an equivalent C++ expression for the following expressions:

  1. ut + ½ ft2
  2. sin a + tan-1 a – e2x
  3. |a| + b >= |b| + a
  4. [3x +5y / 5x +3y – 8xy / 2yx]3/2
  5. e|2×2 – 4x|

Ans.(1). (u*t) +((1/2)*(f*t*t))

Ans.(2). sqrt(sin a + (1/tan a) – exp(2*x))

Ans.(3). abs(a) + b >= abs(b) + a

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

Ans.(5). exp(abs((2*x*x)-(4*x)))

Leave a Reply

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

435 Views
%d bloggers like this: