1、我的第一个vb程序设计,哈哈!Text1.FontSize24Text1.FontName宋体EndSubCommand2_Click()Timer1.EnabledTrueCommand3_Click()FalseTimer1_Timer()Text1.ForeColorRGB(Rnd*255,Rnd255)Sub 三、Label1_Click()IfLabel1.Widthgw+sw+bw thenC=c+iEnd ifNext iPrint c十四、For i = 0 To 9For j = 0 To 9For k = 0 To 9For z = 0 To 9If i 2 + j 2 +
2、 k 2 + z 2 = 115 Thenc = c + 1Next zNext kNext jEnd sub十五、For s = 0 To 9If i 2 + j 2 + k 2 + z 2 + s 2 = 120 ThenNext sPrint (i * 10000 + j * 1000 + k * 100 + z * 10 + s); Max十六、For i = 4000 To 7000gw = i Mod 10sw = i 10 Mod 10bw = i 100 Mod 100qw = i 1000 Mod 1000If gw = qw And sw = bw Then十七、Dim a
3、(1 To 30)a(1) = 1a(2) = 1For i = 3 To 30a(i) = a(i - 1) + a(i - 2)Print a(30)十八、For i = 5 To 11For j = 5 To 8For k = 5 To 7If 2 * i + 5 * j + 10 * k = 100 Then十九、For i = 1 To 9 For j = 0 To 9 For k = 0 To 9 If i * 100 + j * 10 + k + k * 100 + j * 10 + i = 1131 Then Print i * 100 + j * 10 + k Next k
4、Next j二十、Fori19j0k10010PrintkNextji二十一、Sum99Sqr(i)SumRound(Sum,2)附加题Private Sub Command1_Click()正弦 Dim x As Single,y As Single Scale (-8,-8) - (8,8) Line (0,-7) - (0,7) Line (7,0) - (-7,0) For x = -6 to 6 Step 0.01 y = 4 * Sin(x * 60 * 3.14159/180) pSet (x,y) Next xPrivate Sub Command2_Click()余弦 y = 4 * Cos(x * 60 * 3.14159/180)Private Sub Command3_Click()正切 y = 4 * Tan (x * 60 * 3.14159/180)