fork(16) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5.  
  6. int main(){
  7. float x = 2.958;
  8. cout << floorf(x * 100) / 100;
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
2.95