Strange output, not as expected
sorry for asking you a stupid question, but I just can't figure out why I keep on getting this output. So here is my code: #include <cstdio> #include <iostream> using namespace std; unsigned n = 4242; int getRemainderOf(int m, int n, int& quotient); static int l = 0; int main() { int quotient; // the value of which should be changed after calling the func. for(int i=-1; i<=1; ++i) { for(int j=-1; j<=1; ++j) { if( i && j ) { cout << "("<< i*3 << "," << j*7 << ") " <<( getRemainderOf(i*3, 7*j, quotient) ) << " " << quotient <<endl; cout << "("<< i*7 << "," << j*3 << ") " << getRemainderOf(i*7, 3