當前位置:首頁 » 學校課程 » 課程表轉換成二維表

課程表轉換成二維表

發布時間: 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