Skip to content

Instantly share code, notes, and snippets.

View abdulateef's full-sized avatar

Abdulateef abdulateef

  • sekat technologies
  • Lagos Nigeria
View GitHub Profile
@abdulateef
abdulateef / reverse.java
Last active May 14, 2021 14:33
Given an array, A, of N integers, print A's elements in reverse order as a single line of space-separated numbers.
import java.util.Scanner;
public class Reverse{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// System.out.println("Enter the size of the array");
int n = input.nextInt();
int[] arr = new int[n];
// System.out.println("Enter array values");
for(int i=0; i<n; i++){