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