//乘法表
for (int i = ; i < ; i++)//行
{
for (int j = ; j < ; j++)//列
{
if (j <= i)
{
Console.Write("{0}*{1}={2}\t", j, i, j * i);//列在前行在后,小的在前大的在后加上制表符
}
}
Console.WriteLine();
}
Console.ReadKey();
#region 复习冒泡排序
int[] arrayint = { , , , , , , , , , , , , , , , , , , , };
for (int i = ; i < arrayint.Length - ; i++)
{
for (int j = ; j < arrayint.Length - - i; j++)
{
if (arrayint[j] < arrayint[j + ])
{
int temp = arrayint[j];
arrayint[j] = arrayint[j + ];
arrayint[j + ] = temp;
}
}
}
foreach (int item in arrayint)
{
Console.WriteLine(item);
}
Console.ReadKey();
#endregion