Pemrograman C++

Array

#include
#include

using namespace std;

main()
{

char huruf[5][5]={
{‘q’,’w’,’e’,’r’,’t’},
{‘y’,’u’,’i’,’o’,’p’},
{‘a’,’s’,’d’,’f’,’g’},
{‘h’,’j’,’k’,’l’,’z’},
{‘x’,’c’,’v’,’b’,’n’},
};
cout<<”matrik”<<endl;
cout<<endl;

int a,b;
char x;

for(a=0;a<=5;a++){
for(b=0;b<=5;b++){

cout<<” “<<huruf[5][5];}
cout<<endl;}
cout<<endl;

cout<<”masukan koordinat”<<endl;
cout<>a;
cout<>b;
cout<<”hasil koordinat=”<<huruf[5][5];
cout<<endl;
getch();
}

Leave a comment