// Initialize array s to the even
integers from 2 to 20.
#include
<iostream>
using
namespace std;
int main()
{
// constant variable can be used to specify
array size
const int arraySize = 10;
int s[ arraySize ]; // array s has 10 elements
for ( int i = 0; i < arraySize; i++ ) // set
the values
s[ i ] = 2 + 2 * i;
cout << "Element\tValue" <<
endl;
// output contents of array s in tabular
format
for ( int j = 0; j < arraySize; j++
)
{
cout << j << “\t” << s[ j ] << endl;
}
return 0;
// indicates successful termination
} // end main