Riya W.

asked • 08/09/21

Application of Stack and Queue in slove it C++

Write a code in C++ [using object oriented approach] that will take a mathematical expression as input and output whether the parentheses are balanced or not in the expression.                          [10 points]


Sample Input: (5 + (9-(3+2))+ 4)

Sample Output: Balanced 


Sample Input: (5 + (9-(3+2)+ 4)

Sample Output: Not Balanced



You have to submit the code along with the output of the code in reasonable detail in a single pdf fileYour code must contain comments as required.




1 Expert Answer

By:

Patrick B. answered • 08/09/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.