綾の記憶
miou1116
暱稱: Miou綾
性別: 男
國家: 澳門
地區: 風順堂區
« August 2026 »
SMTWTFS
1
2345678
9101112131415
16171819202122
23242526272829
3031
最新文章
2011-03-17
VB
Start of tHe PianO l...
VB
完滿的生日-V-
每月文章
好友名單
最近訪客
最近沒有訪客
2010 年 10 月 14 日  星期四   晴天


VB 分類: 未分類

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim i As Integer = InputBox("")
        Dim j As Integer = InputBox("")
        Dim k As Integer = InputBox("")
        MsgBox(area1(i))
        MsgBox(area1(j, i))
        MsgBox(area1(k, j, i))
    End Sub
    Function area1(ByVal a As Integer)
        Dim ans As Single
        ans = Math.PI * (Math.Pow(a, 2))
        Return ans
    End Function
    Function area1(ByVal a As Integer, ByVal b As Integer)
        Dim ans As Integer
        ans = a * b
        Return ans
    End Function
    Function area1(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer)
        Dim ans As Single
        ans = ((c + b) * a) / 2
        Return ans
    End Function

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim i As Integer = InputBox("")
        MsgBox(power(2, i))
    End Sub
    Function power(ByVal a As Integer, ByVal b As Integer)
        Dim ans As String = "1"
        Dim j As Integer
        For j = 1 To b
            ans = ans & "+ " & a & "^" & j
        Next
        Return ans
    End Function






訪客留言 (返回 miou1116 的日誌)


totofufu 於 2010-10-14 11:18 PM 發表:
又係vb Orz
[ 回覆 ] [ 封鎖 ] [ 刪除 ]


訪客名稱:
電郵地址: (不會公開)
驗證碼:  按此更新驗證碼 (如看不清楚驗證碼請點擊圖片刷新)
俏俏話: (必需 登入 後才能使用此功能)
[ 開啟多功能編輯器 ]