Write a program that asks the user for the row and column size of a 2D array and asks the user for the elements. Write the total of the sum of each row multiplied with the row number. Example: 1 2 3-> (1+2+3) * 1 = 6 4 5 6> (4+5+6) * 2 = 30 789-> (7+8+9) * 3 = 72 total: 108 Inputs 1. One line containing an integer for the number of rows 2. One line containing an integer for the number of columns 3. Multiple lines containing an integer for every element of the array for each line Sample Output Row size: 2 Column size: 2 R1C1: 2 R1C2: 4 R2C1: 6 R2C2: 8 24 68 Total: 34
In C language please
Step by step
Solved in 4 steps with 2 images
In C language please
Write a C program that will display the menu as shown below. Write a function for each item in the menu except the last one.
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:
Note: Record your performance using flipgrid, OBS, or any equivalent app for screen recording. Camera, audio, and desktop must be captured in the video. Upload your video in flipgrid and turn in flipgrid video link in MS Teams.
Descriptions
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}