.net
c# program to print a table of a number
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jul 5, 2013, 11:46 PM EDT
Kunal VaishyaRank #990 · 2K reputationPosted Jul 5, 2013, 11:59 PM EDT
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();