From 6213e39c25043ba5f6be443138fde02eafe68684 Mon Sep 17 00:00:00 2001 From: AlexFromKiyv <81460397+AlexFromKiyv@users.noreply.github.com> Date: Fri, 10 Feb 2023 16:41:57 +0200 Subject: [PATCH] Change output format for big real numbers In this format we see different betwin double and decimal type. --- vscode/Chapter02/Numbers/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode/Chapter02/Numbers/Program.cs b/vscode/Chapter02/Numbers/Program.cs index 9e14285..8772819 100644 --- a/vscode/Chapter02/Numbers/Program.cs +++ b/vscode/Chapter02/Numbers/Program.cs @@ -24,8 +24,8 @@ Console.WriteLine( $"{decimalNotation == hexadecimalNotation}"); Console.WriteLine($"int uses {sizeof(int)} bytes and can store numbers in the range {int.MinValue:N0} to {int.MaxValue:N0}."); -Console.WriteLine($"double uses {sizeof(double)} bytes and can store numbers in the range {double.MinValue:N0} to {double.MaxValue:N0}."); -Console.WriteLine($"decimal uses {sizeof(decimal)} bytes and can store numbers in the range {decimal.MinValue:N0} to {decimal.MaxValue:N0}."); +Console.WriteLine($"double uses {sizeof(double)} bytes and can store numbers in the range {double.MinValue} to {double.MaxValue}."); +Console.WriteLine($"decimal uses {sizeof(decimal)} bytes and can store numbers in the range {decimal.MinValue} to {decimal.MaxValue}."); Console.WriteLine("Using doubles:"); double a = 0.1;