subject

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,

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, lizz1228
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
image
Computers and Technology, 23.06.2019 09:00, jeremytheprimerapper
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
image
Computers and Technology, 24.06.2019 09:00, king514
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
image
Computers and Technology, 24.06.2019 16:30, saadshami2384
You may see the term faq on websites which stands for frequently asked questions this is an example of which type of mnemonic? a) poem b) acronym c) acrostic d) abbreviation ken has dipped many dark chocolate marshmallows (which you remember the metric system distance units in decreasing order: kilometers, hectometer, decameter, centimeter, millimeter) is an example of which type of mnemonic? a) poem b) acronym c) acrostic d) abbreviation !
Answers: 1
You know the right 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, 26.05.2021 01:20
Konu
Biology, 26.05.2021 01:30