#include <stdio.h>
int main(){
int n,t,kcl;
int baris, kolom;
printf("\t ===== Program Array =====\n\n");
printf("\t Masukkan Baris : "); scanf("%d", &baris);
printf("\t Masukkan Kolom : "); scanf("%d", &kolom);
printf("\t ==============================\n");
int f[baris][kolom];
for(n=0;n<baris;n++){
for(t=0;t<kolom;t++){
printf("\t Baris (%d) Kolom (%d) : ",n+1,t+1); scanf("%d", &f[n][t]);
}
}
printf("\t ==============================\n");
for(n=0;n<baris;n++){
for(t=0;t<kolom;t++){
printf("\t %d", f[n][t]);
}
}
printf("\n");
kcl=100;
for(n=0;n<baris;n++){
for(t=0;t<kolom;t++){
if(f[n][t]<kcl){
kcl=f[n][t];}
}
}
printf("\t ==============================\n");
printf("\t Nilai Terkecil Adalah : %d",kcl);
}
0 komentar:
Posting Komentar