Question: Write a program that takes as input an arithmetic expression followed by a semicolon ; . The program outputs whether the expression contains matching grouping

Write a program that takes as input an arithmetic expression followed by a semicolon ;.
The program outputs whether the expression contains matching grouping symbols.
For example, the arithmetic expressions {25+(36)*8} and 7+8*2 contains matching grouping symbols.
However, the expression 5+{(13+7)/8-2*9 does not contain matching grouping symbols.
If the expression contains matching grouping symbols, the program output should contain the following text:
Write a program that reads a line of text, changes each uppercase letter to lowercase, and places each letter both in a queue and onto a stack.
The program should then verify whether the line of text is a palindrome (a set of letters or numbers that is the same whether read forward or backward).
If the input text is a palindrome, the program should print The line of text you entered is a palindrome.
If the input text is not a palindrome, the program should print The line of text you entered is not a palindrome.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!