fork download
  1. #include <cstdio>
  2.  
  3. int main() {
  4. printf("%.2g\n", 18614398509481980.0);
  5. printf("%.2e\n", 18614398509481980.0);
  6.  
  7. return 0;
  8.  
  9. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
1.9e+16
1.86e+16