資源簡介
c++實現(xiàn)的找出數(shù)組中最大值的程序,有輸入數(shù)組函數(shù),顯示數(shù)組函數(shù)。和找出數(shù)組最大值的函數(shù)
代碼片段和文件信息
/**/
#include?
using?namespace?std;
class?Array_max
{
int?maxn;
int?array[100];
public:
void?array_set();
void?array_max();
void?array_show();
};
void?Array_max::array_set()
{
cout<<“請輸入求最大值的值的個數(shù):?“;?cin>>n;
cout<<“請輸入要找出最大值的“< for(int?i=0;i {
cin>>array[i];
評論
共有 條評論