Rabu, 22 Desember 2010

array 2 dimensi

#include
#include
#include

using namespace std;

int main(int argc, char *argv[])
{
int contoh[2] [2];
char name[4] [4];

for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { cout << " masukan contoh " << i << " " << j << " "; cout << " : " ; cin >> contoh[i][j];

}
}
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 2; j++) {
cout << " " << contoh[i][j] << " ";
}
cout << endl;
}

system("PAUSE");
return EXIT_SUCCESS;
}
array 2 dimensi

0 comments:

Posting Komentar

ALL INFORMATION Copyright © 2011 | Template created by O Pregador | Powered by Blogger