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