A-A+

阅读下面程序: include <iostream.h> void main() { int

2022-08-05 20:39:54 问答库 阅读 172 次

问题详情

阅读下面程序:
include <iostream.h>
void main()
{
int i,j,row=0,column=0,m;
static int a[3][3]={ 100,28,72,-30,2,-100};
m=a[0][0];
for (i=0;i<3;i++)
for (j=0;j<3;j++)
if (a[i][j]<m)
{
m=a[i][j];
row=i;
column=j;
}
cout<<m<<","<<row<<","<<column<<endl;
}
该程序的功能是【 】,其执行结果为上丝【 】。请帮忙给出正确答案和分析,谢谢!

参考答案

正确答案:找到数组a中的最小元素并输出其数值及行列值 -10012
找到数组a中的最小元素并输出其数值及行列值 -100,1,2

考点:程序