open_in_new
content_copy
int sum = accumulated(v.begin(),v.end(),0);