Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void lerArray(int[] array,int n){
- int TAM = array.length;
- int[] clone = new int[TAM];
- for(int i = 0;i < TAM;++i){
- clone[i] = array[(Math.abs((TAM*n)-n))%TAM];//TAM-n é o tamanho.
- --n;
- }
- for(int y = 0;y < clone.length;++y)System.out.print(clone[y]);
- }
- public void lerArray2(int[] array,int n){
- int TAM = array.length;
- int[] clone = new int[TAM];
- for(int i = 0;i < TAM;++i){
- clone[i] = array[n % TAM];//TAM-n é o tamanho.
- ++n;
- }
- for(int y = 0;y < clone.length;++y)System.out.print(clone[y]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement