using System;
class MainClass {
public static void Main() {
double num = 64354.2345;
Console.WriteLine("Default format: " + num);
Console.WriteLine("Display positive, negative, " +
"and zero values differently.");
Console.WriteLine("{0:#.#;(#.##);0.00}", num);
num = -num;
Console.WriteLine("{0:#.##;(#.##);0.00}", num);
num = 0.0;
Console.WriteLine("{0:#.##;(#.##);0.00}", num);
}
}
|