Deklarasi Array 2-dimensi

March 31, 2012 at 7:49 am 1 comment

Berikut ini merupakan source dari program Array 2 Dimensi

//Ini merupan contoh program Array 2 Dimensi
#include<stdio.h>
#include<stdlib.h>
int main(void){
 int ANGKA2D[2][5]={10,100,20,200,30,300,40,400,50,500}; //blum tau
 /*Perhatikan penulisan susunan data pada deklarasi array 2-dimensi
 ini*/
 int n,m;
 for (n=0;n<5;++n) //5 beri jumlah baris
 for(m=0;m<2;++m) //2beri jumlah kolom
 printf("Data ANGKA2D[%d][%d] = %d\n",n,m,ANGKA2D[n][m]); //mengeluarkan array[n][m]
 system("pause");
 return 0;
}

Output dari program diatas

Entry filed under: Pemograman C++. Tags: .

Kejadian Tentang Perkembangan Komputer Pointer dan Array

1 Comment Add your own

  • 1. harumn01  |  March 31, 2012 at 9:00 am

    udah sampat list listener,,???

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


JAM

Admin

Categories

Recent Posts

DATE

Blog Stats

  • 3,258 hits

%d bloggers like this: