fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. std::cout << fmod(-5.0, 2.3) << " | " << fmod(5.0, 2.3) << "\n";
  7. return 0;
  8. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
-0.4 | 0.4