Skip to content

Commit 55916c9

Browse files
authored
Missing {}
I hope you understand difference between this: else cout << "There are two adjacent elements where " << "the second is twice the first." << "\n They have values of " << *(result2++); cout << " & " << *result2 << "." << endl; ... and this: else { cout << "There are two adjacent elements where " << "the second is twice the first." << "\n They have values of " << *(result2++); cout << " & " << *result2 << "." << endl; }
1 parent a2433fe commit 55916c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/standard-library/algorithm-functions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ int main()
124124
cout << "There are not two adjacent elements where the "
125125
<< " second is twice the first." << endl;
126126
else
127+
{
127128
cout << "There are two adjacent elements where "
128129
<< "the second is twice the first."
129130
<< "\n They have values of " << *(result2++);
130131
cout << " & " << *result2 << "." << endl;
132+
}
131133
}
132134
```
133135

0 commit comments

Comments
 (0)