fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. int main(void)
  5. {
  6. int a = 12;
  7. int b = 1; // This can never be 02, 03 etc
  8.  
  9. float c = a;
  10. c += b * powf(10, -ceilf(log10f(b)));
  11.  
  12. std::cout << c;
  13. return 0;
  14. }
Success #stdin #stdout 0s 2684KB
stdin
Standard input is empty
stdout
13