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

 
We are nothing without our users ! You can help us offer even more high quality content. Please share our page !
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

Name
Email
Comment
2 + 8 =
 
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2022 CodingFusion
75 Important SQL Server queries you should know