subject

Write a program to reverse a list of numbers in an array. In four steps: (a) Prompts the user for an integer, then asks the user to enter that many values.
(b) Store these values in an array and print the array.
(c) Then reverse the array elements so that the first element becomes the last element, the second element becomes the second to last element, and so on, with the old last element now first. Do not just reverse the order in which they are printed; actually change the way they are stored in the array. Do not create a second array; just arrange the elements within the array you have. (Hint: Swap elements that need to change places.)
(d) When the elements have been reversed, print the array again. Enter the number of elements in the array: 5 Enter the array elements (integers)... Enter element 1: 7 Enter element 2: 2 Enter element 3: 11 Enter element 4: 4 Enter element 5: 8 The array elements before reversing: 7 2 11 4 8 The array after reversing: 8 4 11 2 7

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
You know the right answer?
Write a program to reverse a list of numbers in an array. In four steps: (a) Prompts the user for...
Questions
Questions on the website: 13722367