integers and arithmetic operators : Int Calculation : Data Type C# Examples


C# Examples » Data Type » Int Calculation »

 

integers and arithmetic operators









    
class  MainClass
{

    public  static  void  Main()
    {
        
        System.Console.WriteLine("10  /  3  =  "  +  10  /  3);
        System.Console.WriteLine("10  %  3  =  "  +  10  %  3);
        int  intValue1  =  10;
        int  intValue2  =  3;
        System.Console.WriteLine("intValue1  /  intValue2  =  "  +  intValue1  /  intValue2);
        System.Console.WriteLine("intValue1  %  intValue2  =  "  +  intValue1  %  intValue2);

    }
}
    
   
  
   



Output

10 / 3 = 3
10 % 3 = 1
intValue1 / intValue2 = 3
intValue1 % intValue2 = 1


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Int Calculation