8.Write the algebraic expression corresponding to each of the following C++ statements:
(a) g = x * ( x * x + y * y)/ ( x *x – y* y +2.0);
(b) sum = x*x/a/b;
(c) y = x + x/z + x–2.0;
(d) root = ( b*b –4.0 *a *c )/ ( 2.0*a);
(e) interest = p * n *r /100.0;
9.Find the final value of each of the following arithmetic expression. Assume that all variables are declared as real data types and initialised with the following data:
double a = 4, b = 3, c = 2, d = 1;
(a) v1 = b–c *d / a–d;
(b) v2 = (a * b +c+d) *a;
(c) v3 = a*a + c *d / a–b;
(d) v4 = ((a+b) *( c*a +(a*a))– b *b) / (( c+d) * (c–d));
(e) v5 = (a –2.0 * (a–b))/ (d–c) + a–b*a;
(f) v6 = b*b –4.0*a*c/2*a ;
(g) v7 = (b *b – 4.0 *a*c)/(2.0*a);