C# Program to Generate a Multiplication Table of a given integer

In this C# program, we will take input from the user and generate a multiplication table.

C# Program to Generate Multiplication Table of a given integer Code:

private static void Main(string[] args)
        {
            Console.WriteLine("Enter a Number");
            int num, i, res;
            num = int.Parse(Console.ReadLine());
            for (i = 1; i <= 10; i++)
            {
                res = num * i;
                Console.Write("{0} X {1} = {2} \n", num, i, res);
            }
            Console.ReadLine();
        }	

C# Program to Generate Multiplication Table of a given integer Output:

C#-Program-to-Generate-Multiplication-Table-of-a-given-integer

 
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

Name
Email
Comment
1 + 3 =
 

About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2024 CodingFusion
50+ C# Programs for beginners to practice