fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int i = 3;
  6. int l = i / -2;
  7. int k = i % -2;
  8. cout << l << " " << k;
  9. return 0;
  10. }
Success #stdin #stdout 0.01s 5516KB
stdin
Standard input is empty
stdout
-1 1