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