Computers and Technology

Create and initialize a 5 x 5 array as shown below. 02 000
е 2 ооо
0 2 200
02020
0 2 0 0 2
First, write a printarray() function that prints out the array. Use a single parameter in the definition of the function, and pass the array
you created above as the parameter. Call the function so it prints the original array.
Then write a flipHorizontal() function that flips the contents of the array horizontally and prints the result. This means that the values in
each row should be reversed (look at the second array in the sample run of the program for clarity). Again, this function should pass the
original array as the parameter. Within your fliphorizontal() function, call the printArray function to print the new array that has been
horizontally flipped.
Reset the array back to the original 5 x 5 array we started with.
Then write a flipvertical function that flips the contents of the array vertically and prints the result. This means that the values in each
column should be reversed (look at the third array in the sample run of the program for clarity). Again, this function should pass the original
array as the parameter. Within your flipvertical() function, call the printarray() function to print the new array that has been vertically
flipped.
The sample run below shows how your code should print the original array, followed by the horizontally-flipped array, followed by the
vertically-flipped array. Notice that the output below includes blank lines between each of the three arrays - yours should do the same.

Pls help me


Create and initialize a 5 x 5 array as shown below.

02 000
е 2 ооо
0 2 200
02020
0 2 0 0 2
First,

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:30, devenybates
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
image
Computers and Technology, 23.06.2019 03:30, mem81
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
image
Computers and Technology, 23.06.2019 06:30, QueeeenUknown7437
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, gamingisfun
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
Do you know the correct answer?
Create and initialize a 5 x 5 array as shown below. 02 000
е 2 ооо
0 2 200
02020...

Questions in other subjects:

Konu
Mathematics, 16.04.2020 01:25
Konu
History, 16.04.2020 01:25