C++經典面試題(十一)

94.已知A[n]爲整數數組,試寫出實現下列運算的遞歸算法: (1) 求數組A中的最大整數。 (2) 求n個整數的和。 (3) 求n個整數的平均值。node 【參考答案】ios #include <iostream.h> class RecurveArray { //數組類聲明 private: int *Elements; //數組指針 int ArraySize; //數組尺寸 i
相關文章
相關標籤/搜索