#include<stdio.h>
#include<conio.h>
int main(){
int maks, min;
int *p, matriks []={12,75,2,9,8,30,45,79,90,13,25,9};
for (int z=0;z<12;z++){
printf("Tampilan_Array : %d ",matriks [z]);
printf("\n"); }
for (int b=0;b<12;b++){
if(maks<matriks[b]) maks= matriks [b];
else
if(min>matriks [b]) min= matriks [b];
}
p=matriks;
printf("\nElemen Alamat Nilai\n");
printf("==============================\n");
for (int c=0;c<12;c++){
printf("%4d %p %d\n",c,p,*p);
p++;
}
printf("\n======================\n");
printf("Nilai Terbesar : %d\n",maks);
getch();
return(0);
}
0 komentar:
Posting Komentar