question

HemanthB-9452 avatar image
0 Votes"
HemanthB-9452 asked AgaveJoe answered

Make a huge number small using eular in math - c#

Hi, I have a number that is 100000000000. Now I want it to show in a scientific notation like 1.0000E+11. How do I do that in C#?

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AgaveJoe avatar image
2 Votes"
AgaveJoe answered

Please see standard numeric formatting in C#.


 long number = 100000000000;
 string numberFormat = number.ToString("E");
 Console.WriteLine(numberFormat);

Results

 1.000000E+011



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.