Archive

Posts Tagged ‘JOptionPane’

Mencari Nilai Terbesar Dengan JOptionPane

December 31, 2009 Leave a comment

/*
* 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…

Follow

Get every new post delivered to your Inbox.