int[,] array = new int[10, 10];
for (int z = 1; z <= 9; z++)
{
for (int b = 1; b <= 9; b++)
{
array[z, b] = z * b;
}
}
for (int c = 1; c <= 9; c++)
{
listBox1.Items.Add("" + c + "*1=" + array[c, 1] + "" + c + "*2=" + array[c, 2] + "" + c + "*3=" +array[c, 3] + "" + c + "*4=" + array[c, 4] + "" + c + "*5=" + array[c, 5] + "" + c + "*6=" + array[c, 6] + "" + c + "*7=" + array[c, 7] + "" + c + "*8=" + array[c, 8] + "" + c + "*9=" + array[c, 9]);
}
沒有留言:
張貼留言