Computer Science, asked by shahalmsa95, 1 year ago

Write the equivalent C++ expression for the following Algebraic expression

1) 2AB + 2BC + 2CA / 2A
2) X^2 4/3
3) B^2 - 5AC / 2A

Answers

Answered by samridhvikhasp19d18
9
1) double sum=((2*A*B)+(2*B*C)+(2*C*A))/(2*A);

2) double op=(X*X*4)/3;

3) double oput=((B*B)-(5*A*C))/(2*A);


Answered by skyfall63
3

The equivalent C++ expression for the following Algebraic expression is given below:

  1. ((2*A*B)+(2*B*C)+(2*C*A))/(2*A);
  2. (X*X*4)/3;
  3. ((B*B)-(5*A*C))/(2*A);

Explanation:

Key point to change the algebraic expression into C++ expression is as follows:

  • When AB we need to change the expression as A*B.
  • If there is division operator A+B/C then it is (A+B)/(C).
  • For X^2 expression, it is given as X*X.
  • For + and - operator, there is no change in the expression.
Similar questions