Use format commands : Console Input Output : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Console Input Output »

 

Use format commands









    

/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/
// Use format commands.  
 
using System; 
 
public class DisplayOptions {    
  public static void Main() {    
    int i; 
 
    Console.WriteLine("Value\tSquared\tCubed"); 
 
    for(i = 1; i < 10; i++) 
      Console.WriteLine("{0}\t{1}\t{2}",  
                        i, i*i, i*i*i); 
  }    
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Console Input Output