CSCI 40 Computer Programming Methodology I Assignment 16 Part l Write a program
ID: 3604239 • Letter: C
Question
CSCI 40 Computer Programming Methodology I Assignment 16 Part l Write a program that declares a two dimensional array and initialize it with following integers: 1 2 381 4 5 2 10 3 61 20 21 12 28 -5711 2 -5 10 3 1 2 4 75 041 8 Then, 1. Write statements that display all the numbers in the array. 2. Write statements that calculate and display the sums of the numbers n each row 3. Write statements that calculate and display the smallest number in the array. (Here "calculate" means using looping statements to find the smallest number in the array) Part II (Optional for extra credit) Write a function that receives an integer array, the length of the array, an integer for indicating the position, an integer for insertion) and returns a Boolean value (True or False). Using following function header: bool insert(int a[],int length, int position, int item) The function will shift all the numbers from "position" in the array to the right by one place and replace the number in the "position" by "item" If "position" > “length" or "position"Explanation / Answer
enter the value for disp
1 2 3 8 -1 4 8
7 4 -2 10 -3 6 1
22 21 12 28 -5 7 -11
2 -5 -10 3 1 2 0
4 7 5 0 4 1 8