Question: Draw a Flowchart for the algorithm : a) There is given the array A(10000) it contains given real numbers. Order numbers stored in the array

Draw a Flowchart for the algorithm :

a) There is given the array A(10000) it contains given real numbers. Order numbers stored in the array from the lowest to the highest value. Build the array B(20000). Copy the array A() to the elements of array B()- to the elements from 1 to 10000. Later copy again array A() to the elements of array B(), to the elements from 20000 to 10001 it means in opposite order. Build the array C() which stores in the element C(1) the sum of elements from B(1) to B(100). The element C(2) should store the sum of elements from B(101) to B(200). The same do with the rest of elements.

b) There is given the array A(1000) it contains real numbers. There is also given the array B(1000) it contains real numbers. Order numbers stored in the array A() from the lowest to the highest value. Order numbers stored in the array B() from the highest to the lowest value. Build the array C(1000). For each i compare A(i) with B(i), if A(i) is greater than B(i) put element A(i) to C(i). If A(i) is lower than or equal B(i) put element B(i) to C(i). Build the array D() which stores in the element D(1) the lowest value of elements from C(1) to C(20). The element D(2) should store the lowest value of elements from C(21) to C(40). The same do with the rest of elements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!