Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public static void escolherNumeroEleminar(String[][] socios, int nSocios, int nCampos) {
  2. String numeroApagarS = JOptionPane.showInputDialog("Digite o numero do socio que pertende eleminar");
  3. int numeroApagar = Integer.parseInt(numeroApagarS);
  4. eleminar(socios, nSocios, nCampos, numeroApagar);
  5. }
  6.  
  7. public static void eleminar(String[][] socios, int nSocios, int nCampos, int numeroApagar) {
  8. for (int i = numeroApagar; i < nSocios; i++) {
  9. for (int j = 0; i < nCampos; j++) {
  10. socios[i][j] = socios[i + 1][j];
  11. }
  12. }
  13. nSocios--;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement