Need someone to create this program if able thanks!


Create a function that receives array as an argument, and displays the two
dimensional array.
Create a function that receives arrays as arguments, and transforms the
input array. (See the example for how you need to transform)
Create a main function that initialize an array and invoke functions.
Section 1
Create a function that receives an array as an argument, and displays
the two dimensional array. (Displaying function)
Section 2
Create a function that receives two arrays as arguments, and
transforms the first array and store the result into the second array.
(Transforming function)
Section 3
Main function. Set a random number seed to 1 followed by the last 3
digits of your student ID. Declare two arrays, both 5 X 5 array.
Populate the first array with random numbers that are 2 digits long
(10 through 99).
Section 4
Invoke the Display function by passing the first array as argument.
Section 5
Invoke the Transforming function by passing two arrays as arguments.
Section 6
Invoke the Display function by passing the resulting array as argument.


Output example (In order to make it clear, the numbers in
the original array are sequential. Your program should
contain two digits random numbers.) :

1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25

5 4 3 2 1
10 9 8 7 6
15 14 13 12 11
20 19 18 17 16
25 24 23 22 21

Press any key to continue...
We won't write the program for you, but we'll help you to write it yourself. Start by figuring out what the parameters and return value (if any) of the functions should be. Then fill in the code. For example, Section 1 displays a 5x5 array and doesn't need to return anything, so it might be:
1
2
3
4
void display(int arr[5][5])
{
    // code to display the array
}


The transform function transforms one array into another. I like to use src and dst for parameters like this (for "source" and "destination"):
1
2
3
4
void transform(int src[5][5], int dst[5][5])
{
    // code to transform src into dst
}


Try to fill these in and maybe call them from main(). When you get stuck for 30 minutes, post what you have and explain what has you stuck.
Topic archived. No new replies allowed.