fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string s;
  8. while ((s=Console.ReadLine())!=null) {
  9. double x = double.Parse(s);
  10. Console.WriteLine(string.Format("{0:e5} - {0:g5}", x));
  11. }
  12. }
  13. }
Success #stdin #stdout 0.04s 33912KB
stdin
2.3
2.93939e-12
0.00001
1.27373737288220989e33
1.27373737288220989e-33
stdout
2.30000e+000  -  2.3
2.93939e-012  -  2.9394e-12
1.00000e-005  -  1e-05
1.27374e+033  -  1.2737e+33
1.27374e-033  -  1.2737e-33