Basic Pascal Tutorial/Chapter 2/Programming Assignment/ja: what changed
Revision 3 to 4. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | 2F - 練習問題 (著者: Tao Yue, 状態: 原文のまま修正なし) | |
| 2 | 2 | ||
| 3 | 3 | もう一度5つの数字の合計と平均を求めてみよう。ただし、今度は5つの整数を読み込み、整形して出力に表示させることとする。 | |
| 4 | 4 | ||
| 5 | 5 | 必要ならもとの問題を見直してもよい。数字はキーボードから空白で区切ってタイプするものとする。たとえば、このようになる。 `45 7 68 2 34`。 | |
| 6 | 6 | ||
| 7 | 7 | 出力は以下のようにみえるようになっていなくてはならない。 | |
| 8 | 8 | ||
| 9 | - | ||
| 9 | + | ```text | |
| 10 | 10 | Number of integers = 5 | |
| 11 | 11 | ||
| 12 | 12 | Number1: 45 | |
| 13 | 13 | Number2: 7 | |
| 14 | 14 | Number3: 68 | |
| 15 | 15 | Number4: 2 | |
| 16 | 16 | Number5: 34 | |
| 17 | 17 | ================ | |
| 18 | 18 | Sum: 156 | |
| 19 | 19 | Average: 31.2 | |
| 20 | 20 | ``` | |
| 21 | 21 | ||
| 22 | 22 | 追加の課題としてファイルに出力を書き込むことに挑戦してもよい。ただし、練習問題の解答ではファイルは利用していない。 | |
| 23 | 23 | ||
| 24 | 24 | | | | | | |
| 25 | 25 | |----|----|----| | |
| 26 | 26 | | [[Basic Pascal Tutorial/Chapter 2/EOLN and EOF/ja|previous]] | [[Basic Pascal Tutorial/Contents/ja|contents]] | [[Basic Pascal Tutorial/Chapter 2/Solution/ja|next]] | | |
| 27 | 27 | ||
| 28 | 28 | --- | |
| 29 | 29 | *From the Free Pascal wiki, page "Basic Pascal Tutorial/Chapter 2/Programming Assignment/ja", as it stood on 2022-08-20 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
