Table of any Number Program in C#

Advertisements

Prev Tutorial Next Tutorial

Table of any Number Program in C#

To calculate or find table of any number we multiply given number bu 1 to 10. For write this code we use given formula.

Formula

Table=num*1;
Table=num*2;
Table=num*3;
...................
...................
Table=num*10;

Calculate Table of any Number Program in C#

using System;

namespace Table_Pro
{
class Program
{
static void Main(string[] args)
{
int num;
Console.WriteLine("Enter any Number for Table: ");
num = Convert.ToInt32(Console.ReadLine());
for (int i = 1; i <= 10; i++)
{
Console.WriteLine("{0}*{1}={2}", num, i, i * num);
}
}
}
}

Output

Enter any Number for Table:5
5*1 =5
5*2 =10
5*3 =15
5*4 =20
5*5 =25
5*6 =30
5*7 =35
5*8 =40
5*9 =45
5*10 =50

Output

Enter any Number for Table: 10
10*1 =10
10*2 =20
10*3 =30
10*4 =40
10*5 =50
10*6 =60
10*7 =70
10*8 =80
10*9 =90
10*10 =100

Prev Tutorial Next Tutorial

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements