Thursday, 25 June 2015

Write a C# program to display the multiplication table of a given number

using System;

class pro
{
    static void Main()
    {
        int n,i;
        Console.WriteLine("Enter an integer to find multiplication table: ");
        n=Convert.ToInt32(Console.ReadLine());
        for(i=1;i<=10;++i)
        {
        Console.WriteLine(n+"*"+i+"="+n*i);
        }
    }
}

No comments:

Post a Comment