Convert the mathematical formula as C Expression a x y x

Convert the mathematical formula as C Expression a = (x + y) (x - y)^2 sum = Squareroot a^2 + b^2 m = a^2b^2(a + b)^2 (1 + x)^n

Solution

1. a=(x+y)*(x-y)*(x-y)

2.sum= sqrt(a*a+b*b) ---> dont forget to include math.h library for sqrt function.

3.m=a*a*b*b*(a+b)*(a+b)

4

(1+x)^n=1+x+x^2+……+x^n

so it can be done like this:

for(i=1;i<=n;++i)
sum+=pow(x,i); -->dont forget to include math.h library for pow function.
sum++;

 Convert the mathematical formula as C Expression a = (x + y) (x - y)^2 sum = Squareroot a^2 + b^2 m = a^2b^2(a + b)^2 (1 + x)^n Solution1. a=(x+y)*(x-y)*(x-y)

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site