public class zz {
String hasil [] =
{"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","0","1","2",
"3","4","5","6","7","8","9","
"};
String sandi [] =
{"G","K","M","W","Q","Y","X","Z","N","O","P","A","R","U","T",
"V","Z","H","J","L","B","C","D","E","F","I","7","5","3","2",
"6","8","9","4","1","*"};
String kode = JOptionPane.showInputDialog(null, "Masukkan Kata
Sandi");
char a[] = kode.toCharArray();
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < hasil.length; j++) {
if ()
}
}
}
}
Perhitungan Eksekusi :
hasil [] dieksekusi 1 kali
sandi [] dieksekusi 1 kali
i = 0 dieksekusi 1 kali
i < a. Lenght dieksekusi a kali
i ++ dieksekusi a kali
j = 0 dieksekusi 1 kali
j < sandi.lenght dieksekusi b kali
j ++ dieksekusi b kali
if
dieksekusi
1+b kali
5 + 2a + 3b => jadi 2a +
113
Jumlah
b = 36
5 + 2a + 3.36
5 + 2a + 108
2a + 113
Posted by 02.02 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar