English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

如題 :
輸入N 畫出N(N>=3)邊形
且其多邊形有層次
每層次會因 Timer 而顏色改變

詳細題型↓↓
http://cs.hccvs.hc.edu.tw/~tphsueh/exam942.exe →26題

2006-05-19 01:58:47 · 4 個解答 · 發問者 佳君 5 in 電腦與網際網路 程式設計

4 個解答

'表單置1個CommandButtonConst Pi = 3.14159265358979Dim B As BooleanPrivate Sub Command1_Click()Dim A%, I%, J%, X&, Y&, X1&, Y1&, W#, N%, S%, T%, M%N = Int(Val(InputBox("輸入N就會畫出N邊型(N>=3)", , 5)))If N < 3 Then Exit SubClsW = 360 / N: X = ScaleWidth \ 2: Y = ScaleHeight \ 2A = X: If Y < X Then A = Y ': A = A \ 2Do    For I = 0 To A        T = (T + 1) Mod 256        If T = 0 Then           Randomize           M = Int(Rnd * 256)           S = (S + 1) Mod 3        End If        If S = 0 Then           ForeColor = RGB(M, T, T)        ElseIf S = 1 Then           ForeColor = RGB(T, M, T)        Else           ForeColor = RGB(T, T, M)        End If        For J = 0 To N            X1 = X - Sin(W / 180 * Pi) * I            Y1 = Y + Cos(W / 180 * Pi) * I            W = W + 360 / N            If J = 0 Then Me.PSet (X1, Y1)            Me.Line -(X1, Y1)        Next    Next    DoEventsLoop Until BEnd SubPrivate Sub Form_Unload(Cancel As Integer)B = TrueEnd Sub

2006-05-19 10:44:49 · answer #1 · answered by W.J.S. 7 · 0 0

手機刪除line照片不見真的難過
這家案例夠多,手機記憶體內外都可以,也沒限什麼牌子三星,HTC,SONY都可以,不過要等的比較久才知道原來要分析不是換零件哪麼簡單,心急吃不了熱豆腐,http://www.datahelp.com.tw
htt[://www.data1.com.tw

2015-03-21 03:50:28 · answer #2 · answered by ? 1 · 0 0

這...太*了...
真的是太*了@@"

2006-05-19 11:22:38 · answer #3 · answered by 1 · 0 0

畫多邊形的好像要用 Cos()算角度喔~

2006-05-19 03:34:41 · answer #4 · answered by 以晴 2 · 0 0

fedest.com, questions and answers