Read a vector D of 10 elements. Create a vector E, with all the elements of D in order inverse, that is, the last element will become the first, the penultimate will be the second and so onwards. Write any vector D and any vector E. Can anybody help me ? One of the codes I tried:
int v[]=new int[3];
int z[]=new int[3];
for (int i = 0; i < v.length; i++) {
v[i]=dado.nextInt();
}
for (int i = z.length ; i >= 0; i++) {
z[i]=v[i];
}
for (int i = 0; i < z.length; i++) {
System.out.println(z[i]);
}