Arrays
The STL Array container
// Project 04-01
// Name: Array Data
#include <iostream>
#include <array>
using namespace std;
int main() {
const int ARRAY_SIZE{5};
array<int, ARRAY_SIZE>data{};
int inputValue{};
for (int i = 0; i<ARRAY_SIZE; i++) {
cout << "enter integer " << i+1 << ": ";
cin >> inputValue;
data[i] = inputValue;
}
for (int value : data) {
cout << value*2 << endl;
}
return 0;
}