A negatively running for loop : for : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » for »

 

A negatively running for loop









    

/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/
// A negatively running for loop. 
 
using System; 
 
public class DecrFor {     
  public static void Main() {     
    int x; 
 
    for(x = 100; x > -100; x -= 5) 
      Console.WriteLine(x); 
  } 
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» for