1。下面的数字金字塔怎么打印
                                     1
                                1    2    1
                           1    2    3    2   1
                      1    2    3    4    3   2   1
……………………
一共九行。
2。一个二维数组,如何找出最大值所在的行和列?n×m
3。有一个数a,使得a^2=xxa成立,如5^2=25,25^2=625,写一个过程,判断参数是否满足要求,
并找出1至1000内的所有这样的数。
谢谢大家。

解决方案 »

  1.   

    3.....
    For x = 1 To 1000
    If Right(Str(x ^ 2), 1) = "5" Then Print x
    Next
      

  2.   

    2....理解好象有问题...
    Dim a(n, m) As Double
    Dim b As Double
    Dim c As Integer
    Dim d As Integer
    b = a(0, 0)
    For x = 0 To m
    For y = 0 To n
    If a(x, y) > b Then b = a(x, y): c = x: d = y
    Next
    Next
    Print c, d
      

  3.   

    1,
    Private Sub Form_Click()
        Dim i As Long, j As Long, l As Long
        l = 9
        For i = 1 To l
            Debug.Print Space(l - i);
            For j = 1 To i * 2 - 1
                Debug.Print CStr(j + CBool(j > i) * ((j - i) * 2));
            Next j
            Debug.Print
        Next i
    End Sub
            1
           121
          12321
         1234321
        123454321
       12345654321
      1234567654321
     123456787654321
    12345678987654321