Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- int ChessBoard[8][8];
- // Function prototypes
- void PrintBoard(int[8][8]);
- int main() {
- // Init everything to zero
- for(int i = 0; i < 8; i++)
- for(int j = 0; j < 8; j++)
- ChessBoard[i][j] = i*j;
- PrintBoard(ChessBoard);
- system("pause");
- }
- void PrintBoard(int board[8][8]) {
- for(int i = 0; i < 8; i++) {
- for(int j = 0; j < 8; j++)
- printf("%-3d", ChessBoard[i][j]);
- printf("\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement