fork download
  1. #include <cmath>
  2. #include <iostream>
  3.  
  4. int main(){
  5. long meh = 1e12;
  6. double k = 1e9;
  7. long modr = static_cast<long>(fmod(meh,k));
  8. std::cout << modr << std::endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 2684KB
stdin
Standard input is empty
stdout
147483647