.net
c# program to print a table of a number
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kunal VaishyaPosted Jul 6, 2013, 3:59 AM
int Total = 20; //1 t 20 Table
for (int i = 1; i <= Total; i++)
{
Console.WriteLine("Table of "+i.ToString());
for (int iTable = 1; iTable <= 10; iTable++)
{
int value = iTable * i;
string sPrint = iTable.ToString() + " * " + i.ToString() + " = " + value.ToString();
Console.WriteLine(sPrint);
}
Console.WriteLine(Environment.NewLine);
}
Console.ReadLine();
VulpesPosted Jul 6, 2013, 3:46 AM