fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <iterator>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int a[] = { 1,2,3,4,5 };
  10. int b[] = { 3,5,6,7,9 };
  11.  
  12. set_difference(begin(b), end(b), begin(a), end(a), ostream_iterator<int>(cout, " "));
  13. }
  14.  
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
6 7 9