回答編集履歴
1
訂正
test
CHANGED
@@ -1,21 +1,53 @@
|
|
1
|
+
これで
|
2
|
+
|
3
|
+
|
4
|
+
|
1
5
|
```swift
|
2
6
|
|
3
7
|
let riceballs = ["しゃけ": 150, "梅": 100, "たらこ": 130, "高級いくら": 300]
|
4
8
|
|
5
9
|
|
6
10
|
|
7
|
-
for i in riceballs{
|
11
|
+
for i in riceballs {
|
8
12
|
|
9
|
-
|
13
|
+
print("--------------------")
|
10
14
|
|
11
|
-
|
15
|
+
print("key: (i.key)")
|
12
16
|
|
13
|
-
} else {
|
14
|
-
|
15
|
-
|
17
|
+
print("value: (i.value)")
|
16
|
-
|
17
|
-
}
|
18
18
|
|
19
19
|
}
|
20
20
|
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
--------------------
|
26
|
+
|
27
|
+
key: たらこ
|
28
|
+
|
29
|
+
value: 130
|
30
|
+
|
31
|
+
--------------------
|
32
|
+
|
33
|
+
key: 梅
|
34
|
+
|
35
|
+
value: 100
|
36
|
+
|
37
|
+
--------------------
|
38
|
+
|
39
|
+
key: 高級いくら
|
40
|
+
|
41
|
+
value: 300
|
42
|
+
|
43
|
+
--------------------
|
44
|
+
|
45
|
+
key: しゃけ
|
46
|
+
|
47
|
+
value: 150
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
21
53
|
```
|