#include<iostream>
#include<algorithm>
using namespace std;
int sq(int i)
{
return i*i;
}
int main(0
{
int a[]={10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
cout<<"Display the original elements in the array\n" ;
for(int i=0; i<6; i++)
cout<<A[i]<< " ";
cout<<endl;
// square all elements
transform(A,A+6,A,sq);
cout<<"Display the new elements in the array\n";
for(i=0; i<10; i++)
cout<<A[i]<," ";
}