對啊,哪一本書教你這樣寫的?
Console.Write("(0)(1)=(2)" ,i, j, ij);
編譯一定出錯,ij這個變數一定不存在
這樣寫才對吧?
Console.Write("{0} * {1} = {2}" ,i, j, i*j);
using System.IO;
using System;
class Program
{
static void Main()
{
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= 9; j++)
{
Console.Write("{0}*{0}={0} " ,i, j, i*j);
}
Console.WriteLine();
}
}
}