#include
#include
using namespace std;
int main()
{
valarray v(10), result;
unsigned int i;
for(i=0; i<10; i++) v[i] = i;
cout << "Contents of v: ";
for(i=0; i<10; i++)
cout << v[i] << " ";
cout << endl;
result = v[slice(0,5,2)];
cout << "Contents of result: ";
for(i=0; i cout << result[i] << " ";
return 0;
}