C# Program to print the scientific numbers

C sharp program to print the scientific numbers. 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;
Console.WriteLine(f1);
Console.WriteLine(d1);
}
}
}

 

Output:

15000

110000

What is float number in c sharp program

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.

What is double number in c sharp program

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.

What is using system in c sharp program

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.