Skip to content

Instantly share code, notes, and snippets.

@totynho
Created July 28, 2016 20:13
Show Gist options
  • Save totynho/ecc7d94471beaaacfb1520d26d2d6b0e to your computer and use it in GitHub Desktop.
Save totynho/ecc7d94471beaaacfb1520d26d2d6b0e to your computer and use it in GitHub Desktop.
package javaapplication2;
import java.util.Scanner;
public class Programa {
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
int A[] = new int[10];
int B[] = new int[10];
for (int i = 0; i < 10; i++){
A[i] = entrada.nextInt();
}
GeraInverso(A, B);
for (int i = 0; i < 10; i++){
System.out.println(B[i]);
}
}
public static void GeraInverso(int[] A, int[] B){
for (int i = 0; i < 10; i++){
B[9-i] = A[i];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment