2016年6月17日 星期五

TO Z1A

期末仍是以小考2次為主,以下為變化的部份佔分<=20%

先給3個程式,其它的明日再上傳


 ' 程式1: 執行後 X=?、 Y=? 、 Z=? 、 S(3)  、 W=?
        ' 在即時運算視窗顯示: 635,95,79.375,92,12.6
        Dim S() As Integer = {0, 76, 85, 92, 88, 79, 66, 54, 95}
        Dim X As Integer = 0
        Dim Y As Integer = 0
        Dim Z As Double
        Dim n = S.Length - 1
        For A = 1 To n
            X += S(A)
            If S(A) > Y Then Y = S(A)
        Next
        Z = X / n
        Dim W = Math.Round(S(3) - Z, 1)
        Debug.Print(X & "," & Y & "," & Z & "," & S(3) & "," & W)

    ' 程式2: 執行後 A(5,5)、A(2,3)、  A(5,7)內容
        '  在即時運算視窗顯示: 19,20,48
        Dim n As Integer = 8
        Dim N1 As Integer = n - 1
        Dim N2 = n * n
        Dim C = 1
        Dim A(n, n) As Integer
        For i = 0 To N1
            For j = 0 To N1
                Dim i4 = i Mod 4, j4 = j Mod 4
                If i4 = j4 Or i4 + j4 = 3 Then
                    A(i, j) = N2 + 1 - C
                Else
                    A(i, j) = C
                End If
                C += 1
            Next
        Next
        Debug.Print(A(5, 5) & "," & A(2, 3) & "," & A(5, 7))

    ' 程式3: 執行後 P(2)、P(12)、P(22) 內容
        ' 在即時運算視窗顯示: 5,41,83
        Dim d(500) As Boolean
        Dim P(150) As Integer
        d(0) = True : d(1) = True
        Dim n As Integer = 200
        Dim C As Integer = 0
        For i = 2 To n
            If d(i) = False Then
                P(C) = i
                C += 1
                For j = i + i To n Step i
                    d(j) = True
                Next
            End If
        Next
        Debug.Print(P(2) & "," & P(12) & "," & P(22))


Related Posts:

  • 110上二計題庫網址 需二信  帳號@gsuite.essh.kl.edu.tw 才可下載https://drive.google.com/file/d/1DXDkeQ8RVq8s1UYR52F-yonmH2bHXqke/view?usp=sharing連結下載… Read More
  • 資3忠 EC 段1補充第1段除了課內 80% (課內下載),以下兩部份各佔 10%左右 第1部份:電子商務消費者保護綱領     填充或配合填充 10 格 ,下週(3/23)會加註解說第2部份:題庫500題,主要由第三、第五挑 61 題公布如下(    三、電子… Read More
  • P2(TAB)小考2參考 3/24、3/25 小考2段1考前上課需備課本頁數如下 {另Ch1可不印 2~17,43~45}Ch2:2,3,4,7,8,14,15,16,18,19,22,23,24,25,26,27,28,29Ch3:2,3,4,5,6,10,11,14,15,16,17,19,20,21,22,… Read More
  •  701Excel試題說明如下,  練習用檔案下載701試算表小考  崗位:     座號:    姓名:         直接登    {以下 56… Read More
  • P2(TAB)小考1參考 (p2a,p2b)3/10(三)  、 (p111)3/11小考1範例講義下載質數練習表下載  {質數題 3題填充9%}費氏練習表下載  {費氏數 2題填充6%}若有新的資料,會在此更新基本50分範例:p1-2:「演算法」是解決… Read More

0 意見:

張貼留言