刚好现在有空,帮你做一下吧~~
一个题目20分,你这10个题目,起码也得200分吧!!
稍后上附件!
被8.1和8.2两个题绕晕了,行列什么的用通用过程,可能跟你们老师要求的不一样把!以下是通用过程的代码:
Public Sub ArmStrong()
Dim i As Integer, m As Integer, n As Integer
Dim C As Integer
For i = 10 To 9999
C = Len(CStr(i))
m = 0
For n = 1 To C
m = Val(Mid(i, n, 1)) ^ C + m
Next
If i = m Then Form1.Print i
Next
End Sub
Public Sub PingFang(ByVal C As Integer, ByRef bln As Boolean)
If Sqr(C) = Int(Sqr(C)) Then bln = True
End Sub
Public Sub RC(ByRef brr, ByVal imax As Integer, ByRef r As Integer, ByRef C As Integer)
Dim m As Integer, n As Integer, i As Integer
For m = 0 To UBound(brr)
For n = 0 To UBound(brr, 2)
If brr(m, n) = imax Then
r = m + 1
C = n + 1
End If
Next n, m
End Sub
Public Sub OuShu(ByRef brr, ByRef s As String)
s = ""
Dim m As Integer
For m = 0 To UBound(brr)
If brr(m) Mod 2 = 0 Then s = brr(m) & " " & s
Next
End Sub
详细请下载附件测试: