Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Ejercicio8;
- import java.io.IOException;
- public class Borrado {
- /**
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException {
- // TODO Auto-generated method stub
- int n,pos;
- int [] caracteres={2,4,5,7,12,6,34,11};
- System.out.println("Indique la posicion a eliminar");
- n=Consola.leeInt();
- int b=caracteres.length;
- pos= caracteres[n-1];
- for (int i=n-1;i<b;i++){
- caracteres[i]=caracteres[i+1];
- b--;
- System.out.println(caracteres[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment