Got It
Got It
int fib_numbers[40];
fib_numbers[0] = 0;
fib_numbers[1] = 1;
for (int i = 2; i < 40; i++) {
fib_numbers[i] = fib_numbers[i - 1] + fib_numbers[i - 2];
}
float temperature_readings[30][24];
char chess_board[8][8] = {
{'r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'},
{'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'},
{'.', '.', '.', '.', '.', '.', '.', '.'},
{'.', '.', '.', '.', '.', '.', '.', '.'},
{'.', '.', '.', '.', '.', '.', '.', '.'},
{'.', '.', '.', '.', '.', '.', '.', '.'},
{'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P'},
{'R', 'N', 'B', 'Q', 'K', 'B', 'N', 'R'}
};
11. Using a loop to store data into an 8 × 8 char array named checker_board:
char checker_board[8][8];
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
if ((i + j) % 2 == 0) {
checker_board[i][j] = 'B';
} else {
checker_board[i][j] = 'R';
}
}
}
I hope this format is more helpful! If you have any more questions or need further clarification,
feel free to ask.24681012