From eb0a5d92640b1e7af12c1d41ad4106676046370f Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:11:53 -0600 Subject: [PATCH] vault backup: 2024-10-08 22:11:53 --- .obsidian/app.json | 2 +- .../ECE1400/Chapter 8 Exercises.md | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.obsidian/app.json b/.obsidian/app.json index 3595e31..83fdb69 100644 --- a/.obsidian/app.json +++ b/.obsidian/app.json @@ -2,7 +2,7 @@ "vimMode": true, "promptDelete": false, "pdfExportSettings": { - "includeName": false, + "includeName": true, "pageSize": "Letter", "landscape": false, "margin": "0", diff --git a/education/software development/ECE1400/Chapter 8 Exercises.md b/education/software development/ECE1400/Chapter 8 Exercises.md index 453c7e2..759cf55 100644 --- a/education/software development/ECE1400/Chapter 8 Exercises.md +++ b/education/software development/ECE1400/Chapter 8 Exercises.md @@ -53,4 +53,17 @@ char chess_board[8][8] = { ``` -> 11. Write a program fragment that declares an 8x8 `char` array named `checker_board` and then uses a loop to store the following data into the array (one character per array element). \ No newline at end of file +> 11. Write a program fragment that declares an 8x8 `char` array named `checker_board` and then uses a loop to store the following data into the array (one character per array element). + +```c +char checker_board[8][8]; +for (int row = 0; row < 8; row++) { + for (int column = 0; column < 8; column++) { + if ((column + row) % 2 == 0) { + checker_board[row][column] = 'B'; + } else { + checker_board[row][column] = 'R'; + } + } +} +``` \ No newline at end of file