/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package akar;
import javax.swing.JOptionPane;
/**
*
* @author maulana
*/
public class tugas1 {
public static void main(String[] args) {
String[]aa ={"a","b","c","d","e","f","g","h","i","j","k","l","m","n",
"o","p","q","r","s","t","u","v","w","x","y","z","",""
};
String[]bb = {"10","20","30","40","50","60","70","80","90","00","11","21",
"31","41","51","61","71","81","91","01","12","22","32","42","52","62","72"
,"",""
};
String kode =JOptionPane.showInputDialog(null,"masukkan sandi anda");
char[] c = kode.toCharArray();
for (int i=0;i<c.length;i++){
for (int j=0;j<aa.length;j++){
if (String.valueOf(c[i]).equalsIgnoreCase(aa[j]))
//equels
System.out.println(bb[j]);
}
}
System.out.println("");
}
}
Posted by 18.33 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar