computer science

posted by .

Write a method printBackwards that prints an array of integers in reverse order, in the following format.

For the array {1, -3, 4, 7, 2}:

element [4] is 2
element [3] is 7
element [2] is 4
element [1] is -3
element [0] is 1

  • computer science -

    You're going to have to look up the functions in the particular language you're working with to learn how to store arrays, select elements of the array, and print statements.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Programming

    Here is the source code for the Kitty class: public class Kitty { String name; int age; public Kitty(){ } public void setName(String n){ name = n; } public String getName(){ return name; } public void setAge(int a){ age = a; } public …
  2. college

    Write a C++ program to fill an array with 6 numbers, and then reverse the values of this array. Note: By using a function with two parameters with the name of the array and the size of this array.
  3. Geometry

    If 3 us an element of A and 3 is not an element of B, then which of the following is NOT true 3 is an element of B complement 3 is an element of A union B 3 is an element of A intersect B
  4. shabou

    Can someone please make a Binarytree of these methodes in Java?
  5. computer science

    9.10: Reverse Array Write a function that accepts an int array and the array’s size as arguments. The function should create a copy of the array, except that the element values should be reversed in the copy. The function should …
  6. computer science

    Declare a structure whose tag name is Emp and that contains these fields (in the following order): a double field named d, a character pointer named str, and an array of eleven integers named arr. * I'm good till here. In addition, …
  7. Object Oriented Programming

    Write an application class that generates 6 objects randomly from either a Car, or a Truck, or a Bicycle class. Your generated objects will be stored in a RentedVehicle array. Write a static method in your test class that takes an …
  8. Computers C++

    1). The name of an array stores the __________ of the first array element. 1) memory address 2) value 3) element number 4) subscript 5) None of these
  9. Computer Science

    Write a class “Program1” that has the method “allLess” (below) that receives two arrays of integers and returns true if each element in the first array is less than the element at the same index in the second array. For example, …
  10. programming

    A. Write a program which reads an array of up to 200 integers from input and then does all the following in order 1. searches the array for a specific integer given by the user and outputs its position in the array; 2. outputs the …

More Similar Questions