fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. double n1 = 123.45;
  6. n1 = n1 - (int)n1%100;
  7. cout << n1;
  8. return 0;
  9. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
100.45