Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please do both in c++ and answer the last two too is that better? write a program called assignment. Program that will find the largest
please do both in c++ and answer the last two too
is that better?
write a program called assignment. Program that will find the largest element from Antay with the interne Create an Aray Daryland randomly alive Show the tray with red values Finds the largest element along with the indes from the Array M Forecomple, it Arrays like above the output will be Randomly assigned values in Amar 101175011414 Lartement 45 des mer 83 Create a 20 amay and randomly assig values Show them with a red value Calculate the nation for each row 10 5 20 30 5 30 10 Is 20 E20 3010 10 15 15 For example, matriske above the output will be Matr values and com 20 30 10 7 2020 30 30 30 5 Suation for rows 70 Summation for 240 Summation for cow 3160 Surmation for row4860 Op Allocating and deleting memory dynamically LooCosing Style-vorable names and comments You need to implement the following functions shower function will receive an integer array(2-0) and starf the way arents. The function is the values for Int Largest Index(int intre largestIndex fonction for in the side of the largest feti receives an integrary and size of the arts. void thoutrint **, inta): strax function chox or print the valuri This functies integray(2-1) and site of the time (and) volt findsunit **, Intent): and function calculate the print out in console. This function rester ay 12-0) and of the most and columns) Arts You need to implement the following functions: void showArr(int* arr, int size); showArr function will receive an integer array(1-D) and size of the array as arguments. The function prints the values from array. int largest Index(int *arr, int size); largestIndex function for finding the index of the largest number. This function receives an integer array and size of the array as arguments. void showMatrix(int *a, int numrow, int numcol); showMatrix function show or print the values from matrix. This function receives an integer array (2-D) and size of the dimensions (rows and columns) as arguments. void findRowSum(int *a, int numrow, int nuncol); findRowSum function calculate the summation for each row and print output in the console. This function receives an integer array (2-D) and size of the dimensions (rows and columns) as arguments. + (30 points) Program that will find the largest element from Array with the index number. Creates an Array (10 array) and randomly assign values. . Show the array with assigned values. Finds the largest element along with the index from the Array. 10 18 12 45 30 41 34 For example, if Array is like above then output will be Randomly assigned values in Array: 10 18 12 45 30 11 41 34 Largest element is 45 Index number is 3 (40 points) Program that will calculate the summation for each row from 2D Array Create a matrix (2D array) and randomly assign values Show the matrix with assigned values Calculate the summation for each row 5 5 10 10 20 30 5 8 20 10 20 7 50 10 30 10 10 5 60 5 For example, if matrix is like above then output will be Matrix (values assigned randomly): 10 20 30 5 5 8 10 7 10 5 20 20 10 60 30 10 10 5 5 Summation for row 1 is 70 Summation for row-2 is 40 Summation for row-3 is 160 Summation for row-4 is 60 (20 points) Allocating and deleting memory dynamically + (10 points) Coding Style - variable names and comments. You need to implement the following functions: void showArr(int* arr, int size); showArr function will receive an integer array(1-D) and size of the array as arguments. The function prints the values from array. int largest Index(int *arr, int size); largestIndex function for finding the index of the largest number. This function receives an integer array and size of the array as arguments. void showMatrix(int *a, int numrow, int numcol); showMatrix function show or print the values from matrix. This function receives an integer array (2-D) and size of the dimensions (rows and columns) as arguments. void findRowSum(int *a, int numrow, int numcol); findRowSum function calculate the summation for each row and print output in the console. This function receives an integer array (2-D) and size of the dimensions (rows and columns) as arguments Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started