array multi dimensi

berikut ini adalah program array multi dimensi ,dari praktek bahasa c

/*Praktek bahasa c      */
/*STT DUTA BANGSA @2010 */
#include <stdio.h>
#include <conio.h>
void main()
{ int i, j, k;
static int data_huruf[3][8][8] =
{ { { 1, 1, 1, 1, 1, 1, 1, 0 },
{ 1, 1, 0, 0, 0, 0, 1, 0 },
{ 1, 1, 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 0 },
{ 0, 0, 0, 0, 1, 1, 1, 0 },
{ 1, 0, 0, 0, 1, 1, 1, 0 },
{ 1, 1, 1, 1, 1, 1, 1, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 }
},
{ { 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 }
},
{ { 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 0, 0 }
}

};
/* menampilkan Huruf */
for(i=0; i<3; i++)
{ for(j=0; j<8; j++)
{ for(k=0;k<8; k++)
if(data_huruf[i][j][k])
putchar(‘\xDB’);
else
printf(” “);
puts(” “);
}
puts(” “);
}
getch();
}

Screenshoot program

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: