Tugas DDP Array

#include <conio.h>
#include <iostream>

using namespace std;

main()
{

char abjad[10][10]={
{'A','B','C','A','E','F','F','S','A','Q'},
{'G','H','I','J','K','L','C','D','E','F'},
{'M','A','O','A','Q','R','T','U','V','W'},
{'S','T','U','V','W','X','W','E','R','T'},
{'Y','Z','S','H','I','T','N','O','P','Q'},
{'Q','W','E','R','T','Y','T','U','V','W'},
{'M','N','O','P','Q','R','T','U','V','W'},
{'Y','Z','S','H','I','T','N','O','P','Q'},
{'Q','W','E','R','T','Y','T','U','V','W'},
{'A','B','C','D','E','F','F','S','A','Q'},
};
cout<<"=========================================================\n";
cout<<"Array Double\n";
cout<<"========================================================\n";
cout<<"Isi Array\n\n";
int i,j;
char x;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
cout<<"    "<<abjad[i][j];}
cout<<endl;}
cout<<"\n\n";
cout<<"Masukkan koordinat (mulai dari 0-9)\n";
cout<<"kolom : ";
cin>>j;
cout<<"Baris : ";
cin>>i;
cout<<"Hasil koordinat = "<<abjad[i][j];

cout<<"\n\n========================================================\n";
cout<<"Made by Radhian Prayogo\n";
cout<<"========================================================\n";

getch();
}

Download contoh file Disini !

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