Numeric Formatting
using System;
class MainClass
{
public static void Main()
{
Console.WriteLine("{0:G}", 12345.8977);
Console.WriteLine("{0:G7}", 12345.8977);
Console.WriteLine("{0:G4}", 12345.8977);
}
}
Output 12345.8977
12345.9
1.235E+04
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|