日期:2014-05-17 浏览次数:20495 次
//第一题
int[,] values = new int[,] { { 100, 200, 300 }, { 400, 500, 600 }, { 700, 800, 900 } };
for (int j = 0; j < values.GetLength(1); j++)
{
for (int i = 0; i < values.GetLength(0); i++)
Response.Write(values[i, j] + " ");
Response.Write("<br/>");
}
//第二题
int value = 225;
int sum = 1;
while (value > 0)
{
sum *= value % 10;
value /= 10;
}
Response.Write(sum);
//第三题
int a = 12, b = 45;
string s = new string(b.ToString().ToCharArray().Reverse().ToArray()) + new string(a.ToString().ToCharArray().Reverse().ToArray());
int r = int.Parse(s);
Response.Write(r);
//第四题
string sqlStr = "select 学生编号,max(登陆时间) as 最后登录时间 from 登陆流水 group by 学生编号";