Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need Part 1 and Part 2 please! also has to build and run, thank you! CSCI 40 Computer Programming Methodology I Assignment 16 Part l

image text in transcribed

Need Part 1 and Part 2 please! also has to build and run, thank you!

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 2 4 3 81 45 2 10 3 6 20 21 12 28-5 7 11 2 4 75041 8 5 -10 3 2 0 Then 1. Write statements that display all the numbers in the array 2. Write statements that calculate and display the sums of the numbers in 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"1 the function returns false, otherwise the function returns true For example, if the function receives following array: myArrayl7]-(1,2,3,4,5,6,7), and position-3, item=100, then after the function call, the array would be containing following numbers: (1,2,100,3,4,5,6]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions