Saturday, April 20, 2013
contoh program sederhana (Array)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package praktikum1;
import javax.swing.JOptionPane;
/**
*
* @author surur
*/
public class tugas {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("=================================================");
{System.out.println("NIM"+" "+"Nama"+" "+"MK"+" "+"N.UTS"+" "+"N.UAS"+" "+"N.TUGAS");}
System.out.println("=================================================");
String[][]A=new String[1][3];
String[][]B=new String[3][1];
String[][]C=new String[1][1];
String[][]D=new String[1][1];
String[][]E=new String[1][1];
String[][]F=new String[1][1];
for (int i = 0; i < A.length; i++) {
for (int j = 0; j < B.length; j++) {
A[i][j]=JOptionPane.showInputDialog(null,"NIM : ");
for (int q = 0; q < C.length; q++) {
for (int w = 0; w < D.length; w++) {
C[q][w]=JOptionPane.showInputDialog(null,"Nama :");
for (int a = 0; a < C.length; a++) {
for (int s = 0; s < F.length; s++) {
E[a][s]=JOptionPane.showInputDialog(null,"MK : ");
for (int k = 0; k < E.length; k++) {
for (int l = 0; l < F.length; l++) {
E[k][l]=JOptionPane.showInputDialog(null,"N.UTS : ");
for (int m = 0; m < E.length; m++) {
for (int n = 0; n < F.length; n++) {
E[m][n]=JOptionPane.showInputDialog(null,"N.UAS : ");
for (int o = 0; o < E.length; o++) {
for (int p = 0; p < F.length; p++) {
E[o][p]=JOptionPane.showInputDialog(null,"N.TUGAS : ");
System.out.println( A[i][j]+" "+C[q][w]+" "+E[a][s]+" "+E[k][l]+" "+E[m][n]+" "+E[o][p]);
}}
} } } } }
}
}
}
}
}
}
}
Labels:
java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment