C# Console Appication
Can we write code for a table(mathmatical) using two for loop without using + Operator?
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.
Upendra Pratap ShahiPosted Jun 14, 2015, 1:55 AM
for (int i = 0; i <= 5; i++)
{
}
Manoj BhoirPosted Jun 14, 2015, 1:08 AM
for (int i = 0; i <= 5; i++)
{
for (int j = 0; j <= 5; j++)
{
k[i, j] = i * j;
if (k[i, j] !=0)
Console.Write("|" + k[i, j].ToString().PadLeft(3,' '));
}
Console.WriteLine();
}
| 2| 4| 6| 8| 10
| 3| 6| 9| 12| 15
| 4| 8| 12| 16| 20
| 5| 10| 15| 20| 25