Mod test : Mod « Language Basics « C# / C Sharp






Mod test

Mod test
/*
Learning C# 
by Jesse Liberty

Publisher: O'Reilly 
ISBN: 0596003765
*/
 using System;
 public class ModTester
 {

     public static int Main()
     {
         for (int counter=1; counter<=100; counter++)
         {
             Console.Write("{0} ", counter);

             if ( counter % 10 == 0 )
             {
                 Console.WriteLine("\t{0}", counter);
             }
         }
         return 0;
     }
 }

           
       








Related examples in the same category

1.Demonstrate the % operatorDemonstrate the % operator