Print Scientific Numbers in C#

Print scientific numbers in c#. Scientific notation is a method of expressing numbers that are either too large or too little to be expressed in decimal form. Scientific form or standard index form are two terms that might be used to describe it.

using System;

namespace Main
class Program
static void Main(string[] args)
float f1 = 15e3F;
double d1 = 11E4D;





Float Number in C#

Numbers with a fractional portion and one or more decimals are represented by floating point types. The types float and double are both acceptable. Despite the fact that C# has a large number of numeric types, the most common ones for numbers are int for whole numbers and double for floating point values.

Double Number in C#

The double data type is a built-in data type in the compiler that is used to define numeric variables that contain decimal integers. The double is recognized as a type in C, C++, C#, and many other programming languages. A double type can represent both fractional and full numbers.

Using System in C#

The using System line indicates that your project makes use of the System library. This includes classes and functions such as the Console class and the WriteLine function/method. ProjectName is a namespace that uniquely identifies and encapsulates your code within it. Using this program we can print scientific numbers in c#.