11 #include <iostream>
22 #include <array>
33 #include <cstdlib>
44
55 using namespace std;
66
77 int main(){
88 array<int, 5> d = {1, 2, -1, 3, 5};
99 cout << "Items before modification: " << endl;
1010 for (int item : d){
1111 cout << item << " ";
1212 }
1313 //multiple elements of d by 3
1414 for (int &itemRef : d){
1515 itemRef *= 3;
1616 }
1717 cout << endl << "Items after modification: " << endl;
1818 for (int item : d){
1919 cout << item << " ";
2020 }
2121 cout << endl;
2222 return 0;
2323 }