For loop with multiple expressions : For : Statement C# Examples


C# Examples » Statement » For »

 

For loop with multiple expressions









    
using  System;

class  MainClass
{
      static  void  Main()
      {
            const  int  count  =  5;

            for  (int  i  =  0,  j  =  10;  i  <  count;  i++,  j  +=  10)
            {
                  Console.WriteLine("{0},  {1}",  i,  j);
            }
      }
}
    
   
  
   



Output

0, 10
1, 20
2, 30
3, 40
4, 50


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Statement
» For