質問するログイン新規登録

回答編集履歴

1

修正

2019/06/19 04:20

投稿

asm
asm

スコア15149

answer CHANGED
@@ -1,12 +1,12 @@
1
1
  ```c++
2
2
  string str = "12345678abcdefgh";
3
- string s[4];
3
+ string s[4];
4
- s[0] = str.substr(0, 4);
4
+ s[0] = str.substr(0, 4);
5
- s[1] = str.substr(4, 4);
5
+ s[1] = str.substr(4, 4);
6
- s[2] = str.substr(8, 4);
6
+ s[2] = str.substr(8, 4);
7
- s[3] = str.substr(12,4);
7
+ s[3] = str.substr(12,4);
8
- cout << s[0] << endl
8
+ cout << s[0] << endl
9
- << s[1] << endl
9
+ << s[1] << endl
10
- << s[2] << endl
10
+ << s[2] << endl
11
- << s[3];
11
+ << s[3];
12
12
  ```