试题与答案

使用VC++6.0打开考生文件夹下的源程序文件2.cpp。阅读下列函数说明和代码,完

题型:问答题

题目:

使用VC++6.0打开考生文件夹下的源程序文件2.cpp。阅读下列函数说明和代码,完成空出部分程序。函数fun(int n)的功能是在n行n列的矩阵中,每行都有最大的数,本程序求这n个最大数中的最小一个,并作为参数返回。
注意:不能修改程序的其他部分,只能修改fun函数。
试题程序:
#include<iostream.h>
#define N 100
int a[N][N];
int fun(int n)


void main()

int n;
cout<<"please input N:"<<end1;
cin>>n;
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)

cout<<"please input a Number:"<<end1;
cin>>a[i][j];

cout<<"The min of max numbers is"<<fun(n)<<end1;

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0423/eb46e891f6468131ba155674faa4afbd.html

下面是错误答案,用来干扰机器的。

参考答案:B

试题推荐
微信公众账号搜索答案