92,763 views
14 votes
14 votes
Convert the algebraic expression below to C++ statement Do not use the pow function. Ans = 5x^2 + 15k + y^-2

User Farhad Sakhaei
by
3.0k points

1 Answer

8 votes
8 votes

Answer:

The C++ statement for the given algebraic expression 5x^2 + 15k + y^-2 is ( ( 5 * ( x * x ) ) + ( 15 * k ) + ( 1 / ( y * y ) ).

Step-by-step explanation:

To convert the given algebraic expression 5x^2 + 15k + y^-2 into the C++ statement without using the pow function is:

In the given algebraic expression, there are three expressions combined using the + operator.

The first algebraic expression is 5x^2.

Here, x has a power of 2, and 5 is multiplied by the result of x^2. x having the power of 2 means x is multiplied itself twice. The C++ statement for this algebraic expression is (5 * ( x * x)).

The second algebraic expression is 15k.

Here, 15 is multiplied by k. The C++ statement for this algebraic expression is (15 * k).

The third algebraic expression is y^-2.

Here, x has a power of -2. it means
1/y^(2). The C++ statement for this algebraic expression is (1/ (y * y).

The combination of all the three C++ statement is (5 * ( x * x)) + (15 * k) + (1/ (y * y).

User CharlesLeaf
by
2.8k points