#include <iOStream>
using std::cout;
using std::endl;
double maxValue(double arr, const intarrSize);
int main()
{
const int arrSize = 10;//Size of the array you are going to use
double arr[arrSize] = {0.0};
cout << endl << "Enter the array elements..."
for ( int i = 0; i < arrSize; i++ )
{
cout << endl << "Enter " << (i + 1) << " element:";
cin >> arr[i];
}
cout << endl << "Max value is: " << maxValue;
system("PAUSE");
return 0;
}
double maxValue(double arr, const intarrSize)
{
double max = arr[0];
for ( int j = 0; j < arrSize; j++ )
{
if ( max < arr[j])
{
max = arr[j];
}
}
return max;
}
Copyright © 2026 eLLeNow.com All Rights Reserved.