Created
April 5, 2012 01:38
-
-
Save anonymous/2307257 to your computer and use it in GitHub Desktop.
GOMOKO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void board(); | |
int main() | |
{ | |
board(); | |
} | |
void board() | |
{ | |
cout << "What dimensions would you like for your board?\n" << "Width?"<<endl; | |
int width; | |
int height; | |
cin >> width; | |
cout << "Height?"<<endl;; | |
cin >> height; | |
char array[width][height]; | |
int x = 1, y = 1; | |
while (y <= height) | |
{ | |
while ( x <= width) | |
{ | |
array[x][y] = '='; | |
cout << " | " << array[x][y]; | |
x++; | |
} | |
cout << " | " << y << endl <<endl; | |
y++; | |
x = 1; | |
} | |
cout << " "; | |
while (x <= width) | |
{ | |
cout << " "<< x << " "; | |
x++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment