Example 2
n
#include <iostream.h>
n
int main() {
n
cout << 6
<< endl
n
<< 18
<< endl
n
<< 124
<< endl
n
<<"---" << endl
n
<< (6 + 18 + 128) << endl;
n
return 0;
n
}
n
6
n
18
n
124
n
---
n
148
n
Since no field width manipulators are given,
cout allocates enough space for each number
as it is received