From 750976965fc4049210e1d9af69aef4013021f7f6 Mon Sep 17 00:00:00 2001 From: comavius <123385705+comavius@users.noreply.github.com> Date: Thu, 9 May 2024 13:59:03 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B7=B4=E7=BF=92=E5=95=8F=E9=A1=8C=E3=81=AEC+?= =?UTF-8?q?+=E3=81=AE=E6=96=87=E6=B3=95=E3=82=92=E4=BF=AE=E6=AD=A3=20(#27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add semicolon * add type specifiers --- docs/text/chapter-5/practice/divide-each-difficulty.md | 10 +++++----- docs/text/chapter-6/practice/order.md | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/text/chapter-5/practice/divide-each-difficulty.md b/docs/text/chapter-5/practice/divide-each-difficulty.md index 955b9fa..bbb1a8a 100644 --- a/docs/text/chapter-5/practice/divide-each-difficulty.md +++ b/docs/text/chapter-5/practice/divide-each-difficulty.md @@ -40,8 +40,8 @@ int fibonatti(int index) { int main() { int n; cin >> n; - for (i = 0; i < n; i++) { - for (j = 0; j < n; j++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { int fib_ij = fibonatti(i*j); cout << fib_ij << " "; } @@ -59,7 +59,7 @@ using namespace std; int fibonatti(int index) { int first = 1, second = 1; - for (k = 0; k < index; k++) { + for (int k = 0; k < index; k++) { int next = first + second; first = second; second = next; @@ -70,8 +70,8 @@ int fibonatti(int index) { int main() { int n; cin >> n; - for (i = 0; i < n; i++) { - for (j = 0; j < n; j++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { int fib_ij = fibonatti(i*j); cout << fib_ij << " "; } diff --git a/docs/text/chapter-6/practice/order.md b/docs/text/chapter-6/practice/order.md index 96f0863..1eb8531 100644 --- a/docs/text/chapter-6/practice/order.md +++ b/docs/text/chapter-6/practice/order.md @@ -25,13 +25,13 @@ using namespace std; struct Item { // ここを実装する -} +}; int main() { vector items = { Item{5000, "机", "それなり"}, ... - } + }; // ここに 1番 2番を 解けるプログラムを書く }