Question: Write a c++ program with the following two features: 1) It asks the user to enter a sentence, which may contain numbers and words. The
Write a c++ program with the following two features:
1) It asks the user to enter a sentence, which may contain numbers and words. The program will display all the words first, followed by all the numbers. The sequence of the words and numbers should be the same as the user input. For example (note: user can enter anything as one wants, this is only an example), if the user enters The school has 200 students in 2020 but has more students now, the output should be
The
school
has
students
in
but
has
more
students
now
200
2020
2. The program asks the user to enter a math expression. The program will check the parentheses and display one of the three messages:
The parentheses in the expression is balanced.
There are more opening parentheses than the closing parentheses.
Closing parentheses is detected before opening parentheses.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
