minus.cpp

minus.cpp

#include ‹iostream.h›

#include ‹stl.h›

int input1[4] = {1, 5, 7, 8};

int input2[4] = {1, 4, 8, 3};

int main() {

 int output[4];

 transform(input1, input1 + 4, input2, output, minus‹int›());

 for (int i = 0; i ‹ 4; i++) cout ‹‹ output[i] ‹‹ endl;

 return 0;

}