Calcular letra del DNI


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public String calcularLetraDNI(int dni){
  2. String[] letrasDNI = {"T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"};
  3. return (letrasDNI[dni%23]);
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.