1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <vector>
using namespace std;
int main() {
double x;
x = 3.5;
double x1{3.5};
auto y = 3.5;
cout << y << endl;
vector<double> w{.3, 4., 5};
auto w1 = w;
for (int i=0; i < w.size(); i++) {
cout << w[i] << endl;
}
// w.begin() and w.end() must exist
for (auto wel : w) {
cout << wel << endl;
}
}
Back to week02