modulus |
A binary function object that returns its second operand in the modulus of the first operand.
% y .
#include <algorithm>
#include <functional>
int input1[ 4 ] = { 6, 8, 10, 2 };
int input2[ 4 ] = { 4, 2, 11, 3 };
void
main()
{
int output[ 4 ];
transform( input1, input1 + 4, input2, output, modulus< int >() );
for ( int i = 0; i < 4; ++i )
cout << output[ i ] << "\n";
}
2
0
10
2
Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.