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, 21.06.2019 13:30
Hola, me podrian resolver estos ejercicios en php? ejercicio1: crear una pagina que permita realizar una conversion monteria: nuevos soles, dolares, euros. se debe seleccionar el valor monetario origen y conversion asi como tambien el monto a convertir ejercicio2: crear un pagina que muestre la tabla de sumar de un rango de numeros ingresados por teclado. ejercicio3: ingresar una palabra y mostrar la escritura del final al inicio ejercicio4: ingresar la fecha de nacimiento de una persona y determinar, cuantos años, meses y dias tiene ejercicio5: ingresar un rango de valor numerico y mostrar, los numeros pares, impares y primos.
Answers: 1
question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 24.06.2019 00:50
Which of the following is not a key player in the sale of travel products?
Answers: 2
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: 13722363