package DATABASE;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.JOptionPane;
public class DATABASE {
public static void main(String[] args) throws IOException {
BufferedReader dataIO = new BufferedReader(new InputStreamReader(System.in));
System.out.println( "Masukkan data Mahasiswa");
int jmldata []=new int [10];
String Nama []=new String [10];
String NIK []=new String [10];
String pekerjaan []=new String [10];
int i;
int k = 1;
for (i=0;i<10;i++){
k=i+1;
System.out.println( "Data : "+k );
Nama[i]= JOptionPane.showInputDialog("data ke " +k+"\nNama: ");
NIK[i]= JOptionPane.showInputDialog("data ke " +k+"\nNIK : ");
pekerjaan[i]= JOptionPane.showInputDialog("data ke " +k+"\npekerjaan : ");
}
System.out.println( "\nData Yang Sudah Anda Input");
for (i=0;i<10;i++){
k=i+1;
System.out.println( "Data : "+k );
System.out.println( "Nama: "+Nama[i] );
System.out.println( "NIK : "+NIK[i]);
System.out.println( "pekerjaan :"+pekerjaan[i]);
System.out.println();
}
}
}
0 comments:
Post a Comment