public class soal5 {
public static void main(String[] args) {
String jum = JOptionPane.showInputDialog("MASUKAN NILAI");
int jum2 = Integer.parseInt(jum);
int[] arrayz = new int[jum2];
for (int a=0;a
{
int tambahan= a+1;
String msg = JOptionPane.showInputDialog("MASUKAN NILAI-"+tambahan+"\n(Berupa angka)");
int asd = Integer.parseInt(msg);
arrayz[a]=asd;
//AZIZUL HAKIM PRABOWO
//G1A008035
}
int min= arrayz[0];
for (int i=0;i
{
System.out.print(arrayz[i]+" ");
}
for (int i=0;i
{
if(arrayz[i]
{
min=arrayz[i];
}
}
System.out.println("\nAKAN DIDAPATKAN NILAI MINIMUM= "+min);
}
}
Tidak ada komentar:
Posting Komentar