Simplication of Equation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Simplication of Equation

input: (a+b)-(c-d)+f output: a+b-c+d+f

26th May 2018, 6:43 PM
Pavan M
Pavan M - avatar
2 Answers
+ 3
When you will open the parentheses to calculate beacuse of the - minus sign in front of second parentheses. c will become - minus and d will be in +. Which will lead to the results like you mentioned in the question. You can use Bodmas rule here.
26th May 2018, 7:02 PM
Akash Pal
Akash Pal - avatar
+ 2
parentheses has more priority than any other operants.. first solve parentheses and other (a+b) (c-d) then solve
26th May 2018, 7:53 PM
Arun Tomar
Arun Tomar - avatar