第1个回答 2009-04-19
Private Sub Command1_Click()
Dim a(2, 3) As Double
Dim i As Integer, j As Integer, m As Integer, n As Integer
Randomize
For i = 0 To 2
For j = 0 To 3
a(i, j) = Int(Rnd * 1000)
If a(i, j) > a(m, n) Then m = i: n = j
Print a(i, j);
Next j
Print
Next i
Print "最大的数是:"; m + 1; "行"; n + 1; "列的"; a(m, n)
End Sub
第2个回答 2009-04-22
#include<stdio.h>
void main()
{
int a[3][4],i,j,x,y,z;
for(i=1;i<=3;i++)
for(j=1;j<=4;j++)
scanf("%u",&a[i][j]);
x=1;y=1;z=a[1][1];
for(i=1;i<=3;i++)
for(j=1;j<=4;j++)
if(a[i][j]>a[x][y])
{
x=i;y=j;z=a[i][j];
}
printf("%u %u",x,y);
printf("%u",z);
}