Created
July 28, 2016 20:13
-
-
Save totynho/ecc7d94471beaaacfb1520d26d2d6b0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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