partsum0.cpp

partsum0.cpp

#include ‹stl.h›

#include ‹iostream.h›

int numbers[6] = {1, 2, 3, 4, 5, 6};

int main() {

 int result[6];

 partial_sum(numbers, numbers + 6, result);

 for (int i = 0; i ‹ 6; i ++) cout ‹‹ result[i] ‹‹ ;

 cout ‹‹ endl;

 return 0;

}