I need help the problem below (system give me answer is wrong). 1. Write a program to simplify a Boolean expression. The user will enter from the keyboard a string representing a valid Boolean expression with spaces between the letters. The operators used will be OR (+), AND (*) and NOT (~), and the only valid Input characters will be A, B, +, *, ~, ( , ), 1 and 0. The expression will contain at most 3 operands, 3 operators and one set of parentheses. Output to the screen a line printing the simplified equivalent of the given expression. Simplify means outputting the fewest operators with no parentheses. Use the following list of Boolean Identities to simplify: Refer to the sample output below. Sample Runs (2): Enter a string: ~(A + B)
I need help the problem below (system give me answer is wrong).
1. Write a
representing a valid Boolean expression with spaces between the letters. The operators used will be OR
(+), AND (*) and NOT (~), and the only valid Input characters will be A, B, +, *, ~, ( , ), 1 and 0.
The expression will contain at most 3 operands, 3 operators and one set of parentheses. Output to the
screen a line printing the simplified equivalent of the given expression. Simplify means outputting the
fewest operators with no parentheses. Use the following list of Boolean Identities to simplify:
Refer to the sample output below.
Sample Runs (2):
Enter a string: ~(A + B)
Simplified expression: ~A * ~B
Enter a string: ~A * A + 1
![ngth();
0 icn i += 2) f
A C:\Users\18177\source\repos\Project11\x64\Debug\Project11.exe
s[
(s
Microsoft Visual C++ Runtime Library
Debug Assertion Failed!
Program:
C:\Users\18177\source\repos\Project11\x64\Debug\Project11.e
хе
File: C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include\
xstring
Line: 3839
Expression: string subscript out of range
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
1
(Press Retry to debug the application)
uateBooLExpr(s);
Abort
Retry
Ignore](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6f2d0bea-9aeb-4a4a-b2a8-1fff110f0256%2Fc6ee442a-83a7-44bc-a7b8-aec53f6e5c0f%2F1nuuiiq_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)