using System; public class Tester { public static void Main() { int counterVariable = 0; // initialization int nextCounter = 0; // A string variable to store the numbers as string values sop that they // can be printed string numberRow = " "; // Use for loop to count from 1 to 100 for (counterVariable = 1; counterVariable < 101; counterVariable++) { // Use nextCounter variable to count from 1 to 10 nextCounter++; if (counterVariable < 11) { numberRow += Convert.ToString(counterVariable) + " "; } else { numberRow += Convert.ToString(counterVariable) + " "; } // When nextCounter reaches 10 print out the line of numbers if (nextCounter == 10) { Console.WriteLine(numberRow); numberRow = " "; nextCounter = 0; } } Console.WriteLine( "\nPlease Press any Key to Exit"); System.Console.ReadKey(); } }