How to declare a real variable with at least 20 digits in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main()
    {
        decimal n = 1234567890.123456789012m;

        Console.WriteLine(n);
    }
}



/*
run:

1234567890.123456789012

*/

 



answered Jun 26, 2025 by avibootz

Related questions

1 answer 98 views
1 answer 98 views
1 answer 100 views
1 answer 103 views
1 answer 85 views
1 answer 207 views
...