Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void logic()
- {
- cout << "What dimensions would you like for your board?\n" << "Width?";
- int width;
- int height;
- cin >> width;
- cout << "Height?";
- cin >> height;
- int array[width][height];
- int x = 1, y = 1, widthcount = 0, heightcount =0, value = 0;
- while (y + heightcount <= height)
- {
- while( x + widthcount <= width)
- {
- array[x][y] = 1 + value;
- cout << array[x][y];
- widthcount++;
- }
- cout << endl;
- value++;
- heightcount++;
- }
- }
Add Comment
Please, Sign In to add comment