In the code editor, you are provided with an initial code in the main() that asks the user for the elements of a 5x5 2D array and a call to a function called flex2D(). Do not edit anything in the main() function. Your task is to implement the function definition of the flex2D() with the following details: Return type - void Function name - flex2D Parameters - int[][5] Definition - prints the elements of each of the row twice. Input 1. Elements of a 5x5 2D array Output Enter the elements: 1 9 2 3 4 8 2 4 0 1 0 3 1 3 4 9 2 3 1 5 8 8 1 7 6 Flex: 1 9 2 3 4 1 9 2 3 4 8 2 4 0 1 8 2 4 0 1 0 3 1 3 4 0 3 1 3 4 9 2 3 1 5 9 2 3 1 5 8 8 1 7 6 8 8 1 7 6
5. Flexing My 2D
by CodeChum Admin
I'm a pro-grammer and I want to flex to the world my 2D arrays in an extraordinary way! Ha-ha-ha!
Instructions:
In the code editor, you are provided with an initial code in the main() that asks the user for the elements of a 5x5 2D array and a call to a function called flex2D(). Do not edit anything in the main() function.
Your task is to implement the function definition of the flex2D() with the following details:
Return type - void
Function name - flex2D
Parameters - int[][5]
Definition - prints the elements of each of the row twice.
Input
1. Elements of a 5x5 2D array
Output
Enter the elements:
1 9 2 3 4
8 2 4 0 1
0 3 1 3 4
9 2 3 1 5
8 8 1 7 6
Flex:
1 9 2 3 4
1 9 2 3 4
8 2 4 0 1
8 2 4 0 1
0 3 1 3 4
0 3 1 3 4
9 2 3 1 5
9 2 3 1 5
8 8 1 7 6
8 8 1 7 6
Step by step
Solved in 3 steps with 2 images