Question #185951

What is wrong with the following C++ expression? Explain.

−(b ∗ b − (4 ∗ a ∗ c)))/(2 ∗ a) ;


Expert's answer

The problem with this expression is that the number of parentheses are not balanced. It has a mismatching parentheses. This expression contains three opening parentheses and four closing parentheses. Hence it will cause errors. Another problem is that it contains non-ascii characters hence the c++ compiler will not understand them. The correct expression can be:

-(b * b-(4*a*c))/(2*a); ;



LATEST TUTORIALS
APPROVED BY CLIENTS