1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#include <iostream>
using namespace std;
void displayGraph(int map[6][6]) {
for (int x = 0; x < 7; x++) {
for (int y = 0; y < 7; y++) {
if (map[x][y] == 1) {
cout << "#" << endl;}
else if (map[x][y] == 0) {
cout << " " << endl;
}
}
}
return;
}
int map[6][6] = {
{1, 1, 1, 1, 1, 1},
{1, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 1},
{1, 1, 1, 1, 1, 1}
};
int main()
{
displayGraph(map);
system("PAUSE");
return 0;
}
|