Monday 28 January 2013



// Write a program to print the table of a number

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Table
{
    class Program
    {
        static void Main(string[] args)
        {
            int i,a,n;
            Console.WriteLine("Enter the number");
            n= Convert.ToInt32(Console.ReadLine());
            for(i=1;i<= 10;i++)
            {
                a=n*i;
                Console.WriteLine(a);
            }
            Console.ReadKey();
        }
    }
}

No comments:

Post a Comment