填空题 C++
题号 #2656958

下面函数的功能是从数组x(有n>0个元素)中找出最大元素,请将函数补充完整。
int  findmax(int x[], int n)
{
    int max=__1__;
    for ( int i=1; i<n; i++)
       if ( x[i]>max )
         __2__;
    return max;    
}

进入在线模考

参考答案

暂无

答案解析

1:x[0]  2:max=x[i]

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考