#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> v{1,2,3,4,5};
int i = 0;
while (i < 5) {
cout << i+v[i++] << endl;
}
return 0;
}
Why the output of the program is "2,4,6,8,10", instead of "1,3,5,7,9"?