单选题
若有以下程序:
#include <iostream>
using namespace std;
class sample
{
private:
int x;
public:
sample() { }
void
setx(int i)
{
x=i;
}
friend int fun(sample
B[],int n)
{
int
m=O;
for (int i=O; i<n; i++)
{
if(B[i].x>m)
m=B
[i].x;
}
return m;
}
};
int main ( )
{
sample A[10];
int arr[]={90,87,42,78,97,84,60,55,78,65};
for (int i=O;i<10;i++)
A[i]. setx
(arr[i]);
cout<<fun(A, 10)<<end1;
return 0;
}
该程序运行后的输出结果是( )。