Using a C language, write a C program that will display the menu as shown below and will ask the user to pick a choice that will perfom its function. For example, the user choice 1] which is to get the CARDINAL NUMBER OF A SET, the program must ask the user to input any set of numbers before getting its cardinality. Same goes to the other choices. Make the descriptions below as the reference for each choices in the MENU. It is an algebra and I don't have any idea how to code the above mention. M E N U 1] CARDINAL NUMBER OF A SET 2] UNION OF SETS 3] INTERSECTION OF SETS 4] DIFFERENCE OF 2 SETS 5] COMPLEMENT OF A SET 6] QUIT Enter choice:    Description in every choices: 1] Cardinal Number of a Set Example: Set A ={1, 4, 0, -3, -1, 3, 17} Cardinal Number of Set A = 7 2] Union of Sets Example: Set A ={1, 4, 0, -3, -1, 3, 17} Set B = {2, 4, 6, 8, 10} A Ս B = {0, 1, -1, 2, 3, -3, 4, 6, 8, 10, 17} 3] Intersection of Sets Example: Set A ={1, 4, 0, -3, -1, 3, 17} Set B = {2, 4, 6, 8, 10} A Ո B = {4} 4] Difference of Two Sets Example: Set A ={1, 4, 0, -3, -1, 3, 17} Set B = {2, 4, 6, 8, 10} A – B = {0, 1, -1, 3, -3, 17} B – A = {2, 6, 8, 10} 5] Complement of a Set Example: U = {1, 2, 3, 4, 5, 6, 7 , 8, 9, 10} Set A ={1, 4, 3, 8, 9} A’ = {2, 5, 6, 7, 10}

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section: Chapter Questions
Problem 3PP
icon
Related questions
Question
100%

Using a C language, write a C program that will display the menu as shown below and will ask the user to pick a choice that will perfom its function. For example, the user choice 1] which is to get the CARDINAL NUMBER OF A SET, the program must ask the user to input any set of numbers before getting its cardinality. Same goes to the other choices. Make the descriptions below as the reference for each choices in the MENU. It is an algebra and I don't have any idea how to code the above mention.

M E N U
1] CARDINAL NUMBER OF A SET
2] UNION OF SETS
3] INTERSECTION OF SETS
4] DIFFERENCE OF 2 SETS
5] COMPLEMENT OF A SET
6] QUIT
Enter choice: 

 

Description in every choices:

1] Cardinal Number of a Set Example:

Set A ={1, 4, 0, -3, -1, 3, 17}
Cardinal Number of Set A = 7

2] Union of Sets Example:

Set A ={1, 4, 0, -3, -1, 3, 17}
Set B = {2, 4, 6, 8, 10}
A Ս B = {0, 1, -1, 2, 3, -3, 4, 6, 8, 10, 17}

3] Intersection of Sets Example:

Set A ={1, 4, 0, -3, -1, 3, 17}
Set B = {2, 4, 6, 8, 10}
A Ո B = {4}

4] Difference of Two Sets Example:

Set A ={1, 4, 0, -3, -1, 3, 17}
Set B = {2, 4, 6, 8, 10}
A – B = {0, 1, -1, 3, -3, 17}
B – A = {2, 6, 8, 10}

5] Complement of a Set Example:

U = {1, 2, 3, 4, 5, 6, 7 , 8, 9, 10}
Set A ={1, 4, 3, 8, 9} A’ = {2, 5, 6, 7, 10}

 

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning