Mencari Nilai Terbesar Dengan JOptionPane
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package TugasModule5;import javax.swing.JOptionPane;
/**
*
* @author Arin
*/
public class MencariNilaiTerbesarJOptionPane {public static void main(String[] args) {
int angka[] = new int[10];
int x = 0, z = 0;
String y = “”;for (x = 0; x < 10; x++) {
y = JOptionPane.showInputDialog("Masukkan angka ke " + (x + 1) + ": ");
angka[x] = Integer.parseInt(y);
}
Read more…

Recent Comments