A floating-point literal has an integer part, a decimal point, a fractional part, and an exponent part. You can represent floating point literals either in decimal form or exponential form.
The following are some of the examples of floating point literals −
9.23456 269485E-5F
Let us now print the floating point literals −
using System; namespace Demo { class Program { static void Main(string[] args) { // float float a = 3.56f; Console.WriteLine(a); // float float b = 3.14159f; Console.WriteLine(b); } } }
3.56 3.14159