Here is the sample output of the program. The Bold and Underlined text denotes for user input. Enter number of elements for set A (max 10): 8 ALe] = 2 A[1] = 7 A[2] - 3 AL3] AL4] = 1 ALs] - 5 A[6] - 6 AL7] = 4 = 10 Enter number of elements for setB (max 10): 6 B[e] = 10 B[1] 8 B[2] = Z B[3] = 6 B[4] = 5 BIS] = 2 Output As(1, 3, 4, 5, 6, 7, 9, 10) Ba(2, 5, 6, 7, 8, 1e) AUB=(1,2,3,4,5,6,7,8,9,10} AnBa(5,6,10)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 9PP: (Data processing) Your professor has asked you to write a C++ program that determines grades at the...
icon
Related questions
Question
Please help c++language
Here is the sample output of the program. The Bold and Underlined text denotes for a
user input.
Enter number of elements for set A (max 10): 8
A[e] = 9
A[1] = 7
A[2] = 3
A[3] = 10
A[4] = 1
AL5] = 5
A[6] = 6
AL7] = 4
Enter number of elements for set B (max 10): 6
B[e] = 10
B[1] = 8
B[2] = Z
B[3] = 6
B[4] = 5
BIS] = 2
Output
As(1, 3, 4, 5, 6, 7, 9, 10}
Ba{2, 5, 6, 7, 8, 10}
AUB={1,2,3,4,5,6,7,8,9,10}
AnBs(5,6,10}
Transcribed Image Text:Here is the sample output of the program. The Bold and Underlined text denotes for a user input. Enter number of elements for set A (max 10): 8 A[e] = 9 A[1] = 7 A[2] = 3 A[3] = 10 A[4] = 1 AL5] = 5 A[6] = 6 AL7] = 4 Enter number of elements for set B (max 10): 6 B[e] = 10 B[1] = 8 B[2] = Z B[3] = 6 B[4] = 5 BIS] = 2 Output As(1, 3, 4, 5, 6, 7, 9, 10} Ba{2, 5, 6, 7, 8, 10} AUB={1,2,3,4,5,6,7,8,9,10} AnBs(5,6,10}
1. Union and Intersection of Two Sets
B
3
1
7
9
4
6
2
7
Venn diagram
A={1, 3, 4, 5, 6, 7,9, 10}
B={2, 5, 6, 7, 8, 10}
AUB={1,2,3,4,5,6,7,8,9,10}
ANB={5,6,10}
Create a program Dev C++ that will perform the union and intersection of two input
sets of integer numbers. Use one-dimensional array to represent your set. Your program
must have the following operations in linear lists:
Storing new element in an array
Sorting the elements of an array
Merging two sets
Retrieving elements in an array
Present your solution in a class structure. When printing the elements of an array, make
no sure that there is no duplicate value. Use the following variables in your solution:
N with constant value 10 for maximum size of array
A[N] and B[N] represents the two sets
AUB[N*2] holds the elements for union of A and B
AnB[N] holds the elements for intersection of A and B
Transcribed Image Text:1. Union and Intersection of Two Sets B 3 1 7 9 4 6 2 7 Venn diagram A={1, 3, 4, 5, 6, 7,9, 10} B={2, 5, 6, 7, 8, 10} AUB={1,2,3,4,5,6,7,8,9,10} ANB={5,6,10} Create a program Dev C++ that will perform the union and intersection of two input sets of integer numbers. Use one-dimensional array to represent your set. Your program must have the following operations in linear lists: Storing new element in an array Sorting the elements of an array Merging two sets Retrieving elements in an array Present your solution in a class structure. When printing the elements of an array, make no sure that there is no duplicate value. Use the following variables in your solution: N with constant value 10 for maximum size of array A[N] and B[N] represents the two sets AUB[N*2] holds the elements for union of A and B AnB[N] holds the elements for intersection of A and B
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
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