C# - Print Multiplication Table


The code in C# to print the Multiplication Table.

CODE
using System; class Program { public static void Main(string[] args) { Console.WriteLine("Multiplication Table"); Console.Write("Enter a Number: "); int n = Convert.ToInt32(Console.ReadLine()); for(int i = 1; i <= 10; i++) { Console.WriteLine("{0} x {1} = {2}", i, n, i * n); } Console.ReadKey(); } }

INPUT & OUTPUT
The below is the output of the program.

Comments