While writing a post (in Turkish) I recalled the old days. This is the C# (or modern) version of one of the sample codes, I made in a computer class, years ago. The original one was in BASIC and had four lines, though.

using System;
using System.Text;

namespace TimesTable
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.Clear();
      for(int i = 1; i <= 10; i++)
        for (int j = 1; j <= 10; j++)
        {
          Console.SetCursorPosition(
            ((i - 1) % 5) * 16,
            ((i - 1) / 5) * 11 + (j - 1));
          Console.Write(string.Format(
            "{0,2} x {1,2} = {2,3}", i, j, i * j));
        }
      Console.ReadKey();
    }
  }
}

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>