当前位置:首页 » 学校课程 » 课程表转换成二维表

课程表转换成二维表

发布时间: 2021-01-17 15:40:45

『壹』 asp使用二维数组制作一张课程表

<%
Dim kb(6,7) '第一维表示周几来,第二维自表示第几堂课
'自己给kb数组赋值
Response.Write "<table>"
Response.Write "<tr><td></td><td>周一</td><td>周二</td><td>周三</td><td>周四</td><td>周五</td><td>周六</td><td>周日</td></tr>"
Dim i, j
For i = 0 To 7
Response.Write "<tr><td>第" & i + 1 & "堂</td>"
For j = 0 To 6
Response.Write "<td>" & kb(j,i) & "</td>"
Next
Response.Write "</tr>"
Next
Response.Write "</table>"
%>

『贰』 C# 把课表定义为二维数组,输出出来.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
Console.Write("请输入动态数组的行数:");
int row = Convert.ToInt32(Console.ReadLine());
Console.Write("请输入动态数组的列数:");
int col = Convert.ToInt32(Console.ReadLine());
int[,] arr = new int[row, col];
Console.WriteLine("结果:");
for(int i=0;i<row;i++)
{

热点内容
武汉大学学生会辅导员寄语 发布:2021-03-16 21:44:16 浏览:612
七年级学生作文辅导学案 发布:2021-03-16 21:42:09 浏览:1
不屑弟高考成绩 发布:2021-03-16 21:40:59 浏览:754
大学毕业证会有成绩单 发布:2021-03-16 21:40:07 浏览:756
2017信阳学院辅导员招聘名单 发布:2021-03-16 21:40:02 浏览:800
查询重庆2018中考成绩查询 发布:2021-03-16 21:39:58 浏览:21
结业考试成绩怎么查询 发布:2021-03-16 21:28:40 浏览:679
14中医医师资格笔试考试成绩查分 发布:2021-03-16 21:28:39 浏览:655
名著赏析课程标准 发布:2021-03-16 21:27:57 浏览:881
北京大学商业领袖高端培训课程 发布:2021-03-16 21:27:41 浏览:919