1.
如果一个数等于他的所有的因子之和,这个数就称为“完数”,请编程找出1000以内的所有完数
2.
有一序列:2/1,3/2,5/3,8/5,13/8,21/13,…
求前20项之和
3.
给出一个5行5列的矩阵,数值由用户输入;求出这个矩阵的鞍点(如果有的话)
鞍点:是所在行的最大同时是所在列的最小

解决方案 »

  1.   

    Private Sub Command1_Click()
    Dim i As Integer
    Dim j As Integer
    Dim intArray(5, 5) As Integer
    Dim intMax As Integer
    Dim max  As Integer
    Dim intMin As Integer
    Dim min As Integer
    Dim k As Integer
    Dim blnChoice As Boolean
    For i = 1 To 5
        For j = 1 To 5
            intArray(i, j) = InputBox("请输入数据")出错了! 为什么?
            Print intArray(i, j)
        Next j
        Print
    Next i
    End SubPrivate Sub Command2_Click()
    For i = 1 To 5
      
        max = 0
        intMax = 0
        For j = 1 To 5
            If intMax < intArray(i, j) Then intMax = intArray(i, j): max = j
        Next j
        Print max
        For k = 1 To 5
            If intMax > intArray(k, max) Then blnChoice = True
        Next k
        If blnChoice = False Then Print intMax
    Next iEnd Sub