floats and arithmetic operators : Float : Data Type C# Examples


C# Examples » Data Type » Float »

 

floats and arithmetic operators









    
class  MainClass
{

    public  static  void  Main()
    {
        
        System.Console.WriteLine("10f  /  3f  =  "  +  10f  /  3f);
        float  floatValue1  =  10f;
        float  floatValue2  =  3f;
        System.Console.WriteLine("floatValue1  /  floatValue2  =  "  +  floatValue1  /  floatValue2);

    }
}
    
   
  
   



Output

10f / 3f = 3.333333
floatValue1 / floatValue2 = 3.333333


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Float