welcome


Sabtu, 21 Desember 2013

dejavu pada JAVA



import javax.swing.*;
import java.io.*;

class dejavu {
public static void main (String[]args) {


String a = JOptionPane.showInputDialog("Masukan Angka: ");
int x = Integer.parseInt(a);

if ((x%8==0)) {
a ="DEJAVU";
}
else if ((x%2==0)&&(x%4==0)){
a = "DEJA";
}
else if ((x%2==0)){
a = "DE";
}
JOptionPane.showMessageDialog(null,"Kalimat Terbentuk: "+a,
"DE-JA-VU", JOptionPane.INFORMATION_MESSAGE);
}

    

Tidak ada komentar:

Posting Komentar