forループを使用してパターンを印刷するには?
図(3) 図(4)
** **
** **
** **
** **
**
私はこれを試しました:
static void PrintPattern (int column)
{
for (int r = 0; r <= column + 1; r++)
{
Console.Write("**");
for (int c = 0; c < r; c++)
{
Console.WriteLine(" ");
}
Console.WriteLine();
}
}