Compound operator : Arithmetic Operators : Operator C# Examples


C# Examples » Operator » Arithmetic Operators »

 

Compound operator









    
using  System;

public  class  CompoundAssApp
{
        public  static  void  Main(string[]  args)
        {
                int  nCalc  =  10;
                nCalc  +=  5;
                Console.WriteLine(nCalc);
      
                nCalc  -=  3;
                Console.WriteLine(nCalc);
      
                nCalc  *=  2;
                Console.WriteLine(nCalc);
      
                nCalc  /=  4;
                Console.WriteLine(nCalc);
      
                nCalc  %=  4;
                Console.WriteLine(nCalc);
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Operator
» Arithmetic Operators