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
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);
2) double op=(X*X*4)/3;
3) double oput=((B*B)-(5*A*C))/(2*A);
Answered by
3
The equivalent C++ expression for the following Algebraic expression is given below:
- ((2*A*B)+(2*B*C)+(2*C*A))/(2*A);
- (X*X*4)/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
Math,
8 months ago
Social Sciences,
8 months ago
History,
8 months ago
Math,
1 year ago
Science,
1 year ago