Int and float value : float : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » float »

 

Int and float value









    

/*
Learning C# 
by Jesse Liberty

Publisher: O'Reilly 
ISBN: 0596003765
*/

 using System;

 public class IntFloatTester
 {
     public static void Main()
     {
         int smallInt = 5;
         int largeInt = 12;
         int intQuotient;
         intQuotient = largeInt / smallInt;
         Console.WriteLine("Dividing integers. {0} / {1} = {2}",
             largeInt, smallInt, intQuotient);

         float smallFloat = 5;
         float largeFloat = 12;
         float FloatQuotient;
         FloatQuotient = largeFloat / smallFloat;
         Console.WriteLine("Dividing floats. {0} / {1} = {2}",
             largeFloat, smallFloat, FloatQuotient);

     }
 }
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» float