Write a program that reads an arithmetic expression (as a String) from the standard input and then checks if the parentheses in the expression are balanced (i.e., for every opening parenthesis there should be another one closing). Use the dynamic stack implementation discussed in class and available online in our GitHub repository.
Test your code using the following expressions:
( 5 – 2 ) * 3 / ( 8 + 5 ) ( 5 – 2 ) * 3 / ) 8 + 5 ( 3 + 2 – 4 ( ( ( ( ( 1 + 1 ) – 1 ) – 1 ) – 1 ) – 1 ) ( ( 4 + 2 ) – ( 7 – 3 ) )
Activity, CS2050, solved
[SOLVED] Cs2050 activity 8
$25
File Name: Cs2050_activity_8.zip
File Size: 160.14 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.