-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Conversation
ogasa897
commented
Apr 6, 2025
以下の内容が修正して欲しい点です。お願いします。
疑問点やおかしい点があれば質問してください。
全体
- 「実行例」を「実行結果」に変えて欲しいです。
- 各見出しの下に---を入れて下線を加えて欲しいです。
- puts関数は授業で習わないため、使わないでください。
- int main(int argc, const char * argv[]) を int main(void)にして欲しいです。
- 各ページで練習問題を1問用意していると思いますが、もう少し簡単な問題をそれぞれ1つずつ追加して欲しいです。
- 練習問題は次の画像のようにして欲しいです。
- 実装方法を参照したい場合は、三木のコードから確認してください。
16--array
- 配列の紹介時に配列のイメージ画像を挿入して欲しいです。
- 文ばかりよりも画像があった方がぱっと見でわかりやすいため
- 「要素と添字」、「配列の初期化」のソースコード内の
int sum = 0; // 合計点(初期値:0)
printf("1人目の点数: %3d\n", scores[0]); sum += scores[0];
printf("2人目の点数: %3d\n", scores[1]); sum += scores[1];
printf("3人目の点数: %3d\n", scores[2]); sum += scores[2];
printf("合計点: %d\n", sum);
printf("平均点: %.1f\n", (double)sum / 3);
を
printf("1人目の点数: %3d\n", scores[0]);
printf("2人目の点数: %3d\n", scores[1]);
printf("3人目の点数: %3d\n", scores[2]);
int sum = 0; // 合計点(初期値:0)
sum += scores[0];
sum += scores[1];
sum += scores[2];
printf("合計点: %d\n", sum);
printf("平均点: %.1f\n", (double)sum / 3);
のように変更してほしいです
17--character-string
- こちらが伝え忘れていたのですが、ここで初めてputcharが出てくるので、文字列の入出力の初めにputcharを紹介して欲しいです。
- 一番下の練習問題のところでちゃんと他と同じように見出しで練習問題とつけて欲しいです。
18--多次元配列
- 109~133行目のオブジェクト形式マクロについては、1章の「変数と型」の中の定数の紹介時に紹介しているので、削除して欲しいです。
19--自作関数の設計
- 関数定義について、
返却値型 関数名(仮引数型並び) {
処理の内容
}
から
返却値型 関数名(仮引数型並び) {
処理の内容
return 返却値
}
に変更して欲しいです。
- 64行目の「〜返却された値に置換され、翻訳・実行されます。」の「翻訳」はいらないと思います。
- 呼び出す関数は呼び出される関数よりも上に書かなければいけないという注意書きを加えておいて欲しいです。
- 「値を返さない関数・引数を受け取らない関数」をそれぞれ分けて欲しいです。
- また、サンプルコードもそれぞれで用意して欲しいです(現状のコードでは、初心者には難しいと思うため)
- int mainより上で関数定義だけして、中身は下で実装(プロトタイプ宣言)もできるよっていう紹介をして欲しいです。
- こういうイメージ↓
#include <stdio.h>
// 関数のプロトタイプ宣言(mainより上)
void printScore(int person, int score);
double calcAverage(int sum, int count);
int main(void) {
int scores[3];
scores[0] = 70;
scores[1] = 100;
scores[2] = 85;
int sum = 0;
for (int i = 0; i < 3; i++) {
printScore(i + 1, scores[i]);
sum += scores[i];
}
printf("合計点: %d\n", sum);
printf("平均点: %.1f\n", calcAverage(sum, 3));
return 0;
}
// 関数の実装(mainより下)
void printScore(int person, int score) {
printf("%d人目の点数: %3d\n", person, score);
}
double calcAverage(int sum, int count) {
return (double)sum / count;
}
21--「まるばつゲーム」の作成
- 3行目と4行目の間に「next: false」を追加して欲しいです。
- プログラムの作成1のサンプルコード内の#defineからint mainまでの間のコメントは削除した方がいいかも?
- コードが長いと見づらいため
- 全体的にわかりづらいけど、どう直したらいいかわからん....
## Chapter 16 - 配列の図の追加 - 練習問題の修正 - プログラム番号の追加 ## Chapter 18 - オブジェクト形式マクロに関する記述の削除 ## 全体 - 小見出しの下線(`---`)追加
- `int main(int argc, const char * argv[])`から`int main(void)`へ変更
## Chapter 18 - 二次元配列の図の追加 - 練習問題の修正 - プログラム番号の追加
## Chapter 18 - 練習問題の修正 - プログラム番号の追加
## Chapter 17 - 練習問題の修正 - プログラム番号の追加
## Chapter 19 - 練習問題の修正 - プログラム番号の追加
## Chapter 21 - next: false の記述 - 記述漏れの補完
@wappon28dev
wappon28dev
force-pushed
the
main
branch
2 times, most recently
from
July 4, 2025 07:09
ef21555 to
5bd37d8
Compare
@wappon28dev
wappon28dev
force-pushed
the
main
branch
from
August 22, 2025 04:13
582abdf to
31def74
Compare
ogasa897
ogasa897
approved these changes
Aug 22, 2025
@ogasa897
ogasa897
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
概ね良いと思います。
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
16-21ページの記事を作成しました(確認クイズを除く).